diff --git a/demo/client.ts b/demo/client.ts index adbbd85a..b2468ec3 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -736,7 +736,7 @@ function powerlineSymbolTest() { function addDecoration() { term.options['overviewRulerWidth'] = 15; - const marker = term.addMarker(1); + const marker = term.registerMarker(1); const decoration = term.registerDecoration({ marker, backgroundColor: '#00FF00', @@ -751,13 +751,13 @@ function addDecoration() { function addOverviewRuler() { term.options['overviewRulerWidth'] = 15; - term.registerDecoration({marker: term.addMarker(1), overviewRulerOptions: { color: '#ef2929' }}); - term.registerDecoration({marker: term.addMarker(3), overviewRulerOptions: { color: '#8ae234' }}); - term.registerDecoration({marker: term.addMarker(5), overviewRulerOptions: { color: '#729fcf' }}); - term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#ef2929', position: 'left' }}); - term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#8ae234', position: 'center' }}); - term.registerDecoration({marker: term.addMarker(7), overviewRulerOptions: { color: '#729fcf', position: 'right' }}); - term.registerDecoration({marker: term.addMarker(10), overviewRulerOptions: { color: '#8ae234', position: 'center' }}); - term.registerDecoration({marker: term.addMarker(10), overviewRulerOptions: { color: '#ffffff80', position: 'full' }}); + term.registerDecoration({marker: term.registerMarker(1), overviewRulerOptions: { color: '#ef2929' }}); + term.registerDecoration({marker: term.registerMarker(3), overviewRulerOptions: { color: '#8ae234' }}); + term.registerDecoration({marker: term.registerMarker(5), overviewRulerOptions: { color: '#729fcf' }}); + term.registerDecoration({marker: term.registerMarker(7), overviewRulerOptions: { color: '#ef2929', position: 'left' }}); + term.registerDecoration({marker: term.registerMarker(7), overviewRulerOptions: { color: '#8ae234', position: 'center' }}); + term.registerDecoration({marker: term.registerMarker(7), overviewRulerOptions: { color: '#729fcf', position: 'right' }}); + term.registerDecoration({marker: term.registerMarker(10), overviewRulerOptions: { color: '#8ae234', position: 'center' }}); + term.registerDecoration({marker: term.registerMarker(10), overviewRulerOptions: { color: '#ffffff80', position: 'full' }}); } diff --git a/src/browser/public/Terminal.ts b/src/browser/public/Terminal.ts index 6898af36..53904cf9 100644 --- a/src/browser/public/Terminal.ts +++ b/src/browser/public/Terminal.ts @@ -160,7 +160,6 @@ export class Terminal implements ITerminalApi { this._core.deregisterCharacterJoiner(joinerId); } public registerMarker(cursorYOffset: number = 0): IMarker | undefined { - this._checkProposedApi(); this._verifyIntegers(cursorYOffset); return this._core.addMarker(cursorYOffset); } @@ -169,9 +168,6 @@ export class Terminal implements ITerminalApi { this._verifyPositiveIntegers(decorationOptions.x ?? 0, decorationOptions.width ?? 0, decorationOptions.height ?? 0); return this._core.registerDecoration(decorationOptions); } - public addMarker(cursorYOffset: number): IMarker | undefined { - return this.registerMarker(cursorYOffset); - } public hasSelection(): boolean { return this._core.hasSelection(); } diff --git a/typings/xterm-headless.d.ts b/typings/xterm-headless.d.ts index c840ed09..93029c6f 100644 --- a/typings/xterm-headless.d.ts +++ b/typings/xterm-headless.d.ts @@ -630,18 +630,13 @@ declare module 'xterm-headless' { resize(columns: number, rows: number): void; /** - * (EXPERIMENTAL) Adds a marker to the normal buffer and returns it. If the - * alt buffer is active, undefined is returned. + * Adds a marker to the normal buffer and returns it. If the alt buffer is + * active, undefined is returned. * @param cursorYOffset The y position offset of the marker from the cursor. * @returns The new marker or undefined. */ registerMarker(cursorYOffset?: number): IMarker | undefined; - /** - * @deprecated use `registerMarker` instead. - */ - addMarker(cursorYOffset: number): IMarker | undefined; - /* * Disposes of the terminal, detaching it from the DOM and removing any * active listeners. diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index b6bb0fda..adfc3f54 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -912,18 +912,13 @@ declare module 'xterm' { deregisterCharacterJoiner(joinerId: number): void; /** - * (EXPERIMENTAL) Adds a marker to the normal buffer and returns it. If the - * alt buffer is active, undefined is returned. + * Adds a marker to the normal buffer and returns it. If the alt buffer is + * active, undefined is returned. * @param cursorYOffset The y position offset of the marker from the cursor. * @returns The new marker or undefined. */ registerMarker(cursorYOffset?: number): IMarker | undefined; - /** - * @deprecated use `registerMarker` instead. - */ - addMarker(cursorYOffset: number): IMarker | undefined; - /** * (EXPERIMENTAL) Adds a decoration to the terminal using * @param decorationOptions, which takes a marker and an optional anchor,