Rename setting to experimentalBufferLineImpl, expose in d.ts
This commit is contained in:
+1
-1
@@ -209,7 +209,7 @@ function initOptions(term: TerminalType): void {
|
|||||||
fontWeight: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
fontWeight: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
||||||
fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
||||||
rendererType: ['dom', 'canvas'],
|
rendererType: ['dom', 'canvas'],
|
||||||
bufferLineConstructor: ['JsArray', 'TypedArray']
|
experimentalBufferLineImpl: ['JsArray', 'TypedArray']
|
||||||
};
|
};
|
||||||
const options = Object.keys((<any>term)._core.options);
|
const options = Object.keys((<any>term)._core.options);
|
||||||
const booleanOptions = [];
|
const booleanOptions = [];
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ export class Buffer implements IBuffer {
|
|||||||
* Clears the buffer to it's initial state, discarding all previous data.
|
* Clears the buffer to it's initial state, discarding all previous data.
|
||||||
*/
|
*/
|
||||||
public clear(): void {
|
public clear(): void {
|
||||||
this.setBufferLineFactory(this._terminal.options.bufferLineConstructor);
|
this.setBufferLineFactory(this._terminal.options.experimentalBufferLineConstructor);
|
||||||
this.ydisp = 0;
|
this.ydisp = 0;
|
||||||
this.ybase = 0;
|
this.ybase = 0;
|
||||||
this.y = 0;
|
this.y = 0;
|
||||||
|
|||||||
+2
-2
@@ -106,7 +106,7 @@ const DEFAULT_OPTIONS: ITerminalOptions = {
|
|||||||
theme: null,
|
theme: null,
|
||||||
rightClickSelectsWord: Browser.isMac,
|
rightClickSelectsWord: Browser.isMac,
|
||||||
rendererType: 'canvas',
|
rendererType: 'canvas',
|
||||||
bufferLineConstructor: 'JsArray'
|
experimentalBufferLineImpl: 'JsArray'
|
||||||
};
|
};
|
||||||
|
|
||||||
export class Terminal extends EventEmitter implements ITerminal, IDisposable, IInputHandlingTerminal {
|
export class Terminal extends EventEmitter implements ITerminal, IDisposable, IInputHandlingTerminal {
|
||||||
@@ -493,7 +493,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'tabStopWidth': this.buffers.setupTabStops(); break;
|
case 'tabStopWidth': this.buffers.setupTabStops(); break;
|
||||||
case 'bufferLineConstructor':
|
case 'experimentalBufferLineImpl':
|
||||||
this.buffers.normal.setBufferLineFactory(value);
|
this.buffers.normal.setBufferLineFactory(value);
|
||||||
this.buffers.alt.setBufferLineFactory(value);
|
this.buffers.alt.setBufferLineFactory(value);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -263,7 +263,6 @@ export interface ITerminalOptions extends IPublicTerminalOptions {
|
|||||||
screenKeys?: boolean;
|
screenKeys?: boolean;
|
||||||
termName?: string;
|
termName?: string;
|
||||||
useFlowControl?: boolean;
|
useFlowControl?: boolean;
|
||||||
bufferLineConstructor?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IBuffer {
|
export interface IBuffer {
|
||||||
|
|||||||
Vendored
+11
@@ -99,6 +99,17 @@ declare module 'xterm' {
|
|||||||
*/
|
*/
|
||||||
experimentalCharAtlas?: 'none' | 'static' | 'dynamic';
|
experimentalCharAtlas?: 'none' | 'static' | 'dynamic';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (EXPERIMENTAL) Defines which implementation to use for buffer lines.
|
||||||
|
*
|
||||||
|
* - 'JsArray': The default/stable implementation.
|
||||||
|
* - 'TypedArray': The new experimental implementation based on TypedArrays that is expected to
|
||||||
|
* significantly boost performance and memory consumption. Use at your own risk.
|
||||||
|
*
|
||||||
|
* This option will be removed in the future.
|
||||||
|
*/
|
||||||
|
experimentalBufferLineImpl?: 'JsArray' | 'TypedArray';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The font size used to render text.
|
* The font size used to render text.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user