From cd557f86675280bc26ea4346ffd90a1e9c245e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Breitbart?= Date: Thu, 1 Feb 2024 13:52:05 +0100 Subject: [PATCH] Revert "Expose API method for writing to application side (#4948)" This reverts commit f1e563ad5ffe732a9709432101fec212faca8f48. --- src/browser/Terminal.ts | 9 --------- src/browser/TestUtils.test.ts | 3 --- src/browser/public/Terminal.ts | 3 --- test/playwright/TestUtils.ts | 1 - typings/xterm.d.ts | 6 ------ 5 files changed, 22 deletions(-) diff --git a/src/browser/Terminal.ts b/src/browser/Terminal.ts index 6e06855a8a..0e945aa92b 100644 --- a/src/browser/Terminal.ts +++ b/src/browser/Terminal.ts @@ -1191,15 +1191,6 @@ export class Terminal extends CoreTerminal implements ITerminal { return false; } - - /** - * Input data to application side. - * The data is treated the same way as typed input at the terminal (will appear in the onData event). - */ - public input(data: string): void { - this.coreService.triggerDataEvent(data, true); - return this.write(data); - } /** * Resizes the terminal. diff --git a/src/browser/TestUtils.test.ts b/src/browser/TestUtils.test.ts index 95f1fbacdc..59cc773a47 100644 --- a/src/browser/TestUtils.test.ts +++ b/src/browser/TestUtils.test.ts @@ -72,9 +72,6 @@ export class MockTerminal implements ITerminal { public focus(): void { throw new Error('Method not implemented.'); } - public input(data: string): void { - throw new Error('Method not implemented.'); - } public resize(columns: number, rows: number): void { throw new Error('Method not implemented.'); } diff --git a/src/browser/public/Terminal.ts b/src/browser/public/Terminal.ts index d8c8315d87..ade46fa482 100644 --- a/src/browser/public/Terminal.ts +++ b/src/browser/public/Terminal.ts @@ -138,9 +138,6 @@ export class Terminal extends Disposable implements ITerminalApi { public focus(): void { this._core.focus(); } - public input(data: string): void { - this._core.input(data); - } public resize(columns: number, rows: number): void { this._verifyIntegers(columns, rows); this._core.resize(columns, rows); diff --git a/test/playwright/TestUtils.ts b/test/playwright/TestUtils.ts index facbc881aa..4d4112f07a 100644 --- a/test/playwright/TestUtils.ts +++ b/test/playwright/TestUtils.ts @@ -216,7 +216,6 @@ export class TerminalProxy implements ITerminalProxyCustomMethods, PlaywrightApi return new Promise(r => term.writeln(typeof data === 'string' ? data : new Uint8Array(data), r)); }, [await this.getHandle(), typeof data === 'string' ? data : Array.from(data)] as const); } - public async input(data: string): Promise { return this.evaluate(([term]) => term.input(data)); } public async resize(cols: number, rows: number): Promise { return this._page.evaluate(([term, cols, rows]) => term.resize(cols, rows), [await this.getHandle(), cols, rows] as const); } public async registerMarker(y?: number | undefined): Promise { return this._page.evaluate(([term, y]) => term.registerMarker(y), [await this.getHandle(), y] as const); } public async registerDecoration(decorationOptions: IDecorationOptions): Promise { return this._page.evaluate(([term, decorationOptions]) => term.registerDecoration(decorationOptions), [await this.getHandle(), decorationOptions] as const); } diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 9268063979..39a9c91a52 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -962,12 +962,6 @@ declare module '@xterm/xterm' { * Focus the terminal. */ focus(): void; - - /** - * Input data to application side. - * The data is treated the same way as typed input at the terminal (will appear in the onData event). - */ - input(data: string): void; /** * Resizes the terminal. It's best practice to debounce calls to resize,