diff --git a/demo/client.ts b/demo/client.ts index 3a015710..2a0339eb 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -265,8 +265,7 @@ function initOptions(term: TerminalType): void { fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], logLevel: ['debug', 'info', 'warn', 'error', 'off'], rendererType: ['dom', 'canvas'], - wordSeparator: null, - unicodeVersion: ['6', '11'] + wordSeparator: null }; const options = Object.keys((term)._core.options); const booleanOptions = []; diff --git a/src/Terminal.ts b/src/Terminal.ts index 8ae36768..6a75979b 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -347,11 +347,6 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp this._windowsMode = undefined; } break; - case 'unicodeVersion': - if (this.unicodeService.activeVersion !== this.optionsService.options.unicodeVersion) { - this.unicodeService.activeVersion = this.optionsService.options.unicodeVersion; - } - break; } }); } diff --git a/src/common/services/OptionsService.ts b/src/common/services/OptionsService.ts index 505d16e1..7cd111ac 100644 --- a/src/common/services/OptionsService.ts +++ b/src/common/services/OptionsService.ts @@ -52,7 +52,6 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({ screenKeys: false, cancelEvents: false, useFlowControl: false, - unicodeVersion: '6', wordSeparator: ' ()[]{}\',:;"`' }); diff --git a/src/common/services/Services.ts b/src/common/services/Services.ts index ce24e5c1..ce7b33f7 100644 --- a/src/common/services/Services.ts +++ b/src/common/services/Services.ts @@ -238,7 +238,6 @@ export interface IPartialTerminalOptions { scrollSensitivity?: number; tabStopWidth?: number; theme?: ITheme; - unicodeVersion?: string; windowsMode?: boolean; wordSeparator?: string; } @@ -273,7 +272,6 @@ export interface ITerminalOptions { scrollSensitivity: number; tabStopWidth: number; theme: ITheme; - unicodeVersion: string; windowsMode: boolean; wordSeparator: string; diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 8a7464a6..d0479897 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -215,12 +215,6 @@ declare module 'xterm' { */ theme?: ITheme; - /** - * Unicode version to be used for wcwidth. Default is version 6. - * New unicode versions can be registered through the `Terminal.unicode.register` API. - */ - unicodeVersion?: string; - /** * Whether "Windows mode" is enabled. Because Windows backends winpty and * conpty operate by doing line wrapping on their side, xterm.js does not @@ -1173,9 +1167,14 @@ declare module 'xterm' { * Used to register custom Unicode versions with `Terminal.unicode.register`. */ export interface IUnicodeVersionProvider { - /** String indicating the Unicode version provided. */ + /** + * String indicating the Unicode version provided. + */ readonly version: string; - /** Unicode version dependent wcwidth implementation. */ + + /** + * Unicode version dependent wcwidth implementation. + */ wcwidth(codepoint: number): 0 | 1 | 2; } @@ -1187,13 +1186,14 @@ declare module 'xterm' { * Register a custom Unicode version provider. */ register(provider: IUnicodeVersionProvider): void; + /** * Registered Unicode versions. */ readonly versions: ReadonlyArray; + /** - * Getter/setter for activate Unicode version. - * FIXME: Should we go with this instead of get/SetOption? + * Getter/setter for active Unicode version. */ activeVersion: string; }