Remove debug internal option completely and add option APIs
This commit is contained in:
@@ -220,7 +220,6 @@ function initOptions(term: TerminalType): void {
|
|||||||
// Internal only options
|
// Internal only options
|
||||||
'cancelEvents',
|
'cancelEvents',
|
||||||
'convertEol',
|
'convertEol',
|
||||||
'debug',
|
|
||||||
'handler',
|
'handler',
|
||||||
'screenKeys',
|
'screenKeys',
|
||||||
'termName',
|
'termName',
|
||||||
|
|||||||
@@ -347,7 +347,6 @@ export class InputHandler extends Disposable implements IInputHandler {
|
|||||||
const cursorStartX = buffer.x;
|
const cursorStartX = buffer.x;
|
||||||
const cursorStartY = buffer.y;
|
const cursorStartY = buffer.y;
|
||||||
|
|
||||||
// TODO: Consolidate debug/logging #1560
|
|
||||||
this._logService.debug('parsing data', data);
|
this._logService.debug('parsing data', data);
|
||||||
|
|
||||||
if (this._parseBuffer.length < data.length) {
|
if (this._parseBuffer.length < data.length) {
|
||||||
|
|||||||
Vendored
-1
@@ -279,7 +279,6 @@ export interface ITerminalOptions extends IPublicTerminalOptions {
|
|||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
cancelEvents?: boolean;
|
cancelEvents?: boolean;
|
||||||
convertEol?: boolean;
|
convertEol?: boolean;
|
||||||
debug?: boolean;
|
|
||||||
handler?: (data: string) => void;
|
handler?: (data: string) => void;
|
||||||
screenKeys?: boolean;
|
screenKeys?: boolean;
|
||||||
termName?: string;
|
termName?: string;
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({
|
|||||||
convertEol: false,
|
convertEol: false,
|
||||||
termName: 'xterm',
|
termName: 'xterm',
|
||||||
screenKeys: false,
|
screenKeys: false,
|
||||||
debug: false,
|
|
||||||
cancelEvents: false,
|
cancelEvents: false,
|
||||||
useFlowControl: false,
|
useFlowControl: false,
|
||||||
wordSeparator: ' ()[]{}\'"'
|
wordSeparator: ' ()[]{}\'"'
|
||||||
|
|||||||
Vendored
-1
@@ -94,7 +94,6 @@ export interface ITerminalOptions {
|
|||||||
cols: number;
|
cols: number;
|
||||||
cursorBlink: boolean;
|
cursorBlink: boolean;
|
||||||
cursorStyle: 'block' | 'underline' | 'bar';
|
cursorStyle: 'block' | 'underline' | 'bar';
|
||||||
debug: boolean;
|
|
||||||
disableStdin: boolean;
|
disableStdin: boolean;
|
||||||
drawBoldTextInBrightColors: boolean;
|
drawBoldTextInBrightColors: boolean;
|
||||||
fontSize: number;
|
fontSize: number;
|
||||||
|
|||||||
@@ -133,8 +133,8 @@ export class Terminal implements ITerminalApi {
|
|||||||
public writeUtf8(data: Uint8Array): void {
|
public writeUtf8(data: Uint8Array): void {
|
||||||
this._core.writeUtf8(data);
|
this._core.writeUtf8(data);
|
||||||
}
|
}
|
||||||
public getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'rendererType' | 'termName' | 'wordSeparator'): string;
|
public getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string;
|
||||||
public getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell'): boolean;
|
public getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell'): boolean;
|
||||||
public getOption(key: 'colors'): string[];
|
public getOption(key: 'colors'): string[];
|
||||||
public getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
|
public getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
|
||||||
public getOption(key: 'handler'): (data: string) => void;
|
public getOption(key: 'handler'): (data: string) => void;
|
||||||
@@ -144,9 +144,10 @@ export class Terminal implements ITerminalApi {
|
|||||||
}
|
}
|
||||||
public setOption(key: 'bellSound' | 'fontFamily' | 'termName' | 'wordSeparator', value: string): void;
|
public setOption(key: 'bellSound' | 'fontFamily' | 'termName' | 'wordSeparator', value: string): void;
|
||||||
public setOption(key: 'fontWeight' | 'fontWeightBold', value: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'): void;
|
public setOption(key: 'fontWeight' | 'fontWeightBold', value: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'): void;
|
||||||
|
public setOption(key: 'logLevel', value: 'debug' | 'info' | 'warn' | 'error' | 'off'): void;
|
||||||
public setOption(key: 'bellStyle', value: 'none' | 'visual' | 'sound' | 'both'): void;
|
public setOption(key: 'bellStyle', value: 'none' | 'visual' | 'sound' | 'both'): void;
|
||||||
public setOption(key: 'cursorStyle', value: 'block' | 'underline' | 'bar'): void;
|
public setOption(key: 'cursorStyle', value: 'block' | 'underline' | 'bar'): void;
|
||||||
public setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell', value: boolean): void;
|
public setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell', value: boolean): void;
|
||||||
public setOption(key: 'colors', value: string[]): void;
|
public setOption(key: 'colors', value: string[]): void;
|
||||||
public setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void;
|
public setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void;
|
||||||
public setOption(key: 'handler', value: (data: string) => void): void;
|
public setOption(key: 'handler', value: (data: string) => void): void;
|
||||||
|
|||||||
Vendored
+9
-3
@@ -693,12 +693,12 @@ declare module 'xterm' {
|
|||||||
* Retrieves an option's value from the terminal.
|
* Retrieves an option's value from the terminal.
|
||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
*/
|
*/
|
||||||
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold'| 'rendererType' | 'termName' | 'wordSeparator'): string;
|
getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'fontWeight' | 'fontWeightBold' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string;
|
||||||
/**
|
/**
|
||||||
* Retrieves an option's value from the terminal.
|
* Retrieves an option's value from the terminal.
|
||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
*/
|
*/
|
||||||
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean;
|
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean;
|
||||||
/**
|
/**
|
||||||
* Retrieves an option's value from the terminal.
|
* Retrieves an option's value from the terminal.
|
||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
@@ -732,6 +732,12 @@ declare module 'xterm' {
|
|||||||
* @param value The option value.
|
* @param value The option value.
|
||||||
*/
|
*/
|
||||||
setOption(key: 'fontWeight' | 'fontWeightBold', value: null | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'): void;
|
setOption(key: 'fontWeight' | 'fontWeightBold', value: null | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'): void;
|
||||||
|
/**
|
||||||
|
* Sets an option on the terminal.
|
||||||
|
* @param key The option key.
|
||||||
|
* @param value The option value.
|
||||||
|
*/
|
||||||
|
setOption(key: 'logLevel', value: LogLevel): void;
|
||||||
/**
|
/**
|
||||||
* Sets an option on the terminal.
|
* Sets an option on the terminal.
|
||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
@@ -749,7 +755,7 @@ declare module 'xterm' {
|
|||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
* @param value The option value.
|
* @param value The option value.
|
||||||
*/
|
*/
|
||||||
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void;
|
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void;
|
||||||
/**
|
/**
|
||||||
* Sets an option on the terminal.
|
* Sets an option on the terminal.
|
||||||
* @param key The option key.
|
* @param key The option key.
|
||||||
|
|||||||
Reference in New Issue
Block a user