Skip to content

Commit

Permalink
Revert "Expose API method for writing to application side (xtermjs#4948
Browse files Browse the repository at this point in the history
…)"

This reverts commit f1e563a.
  • Loading branch information
jerch committed Feb 1, 2024
1 parent 633bb06 commit cd557f8
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 22 deletions.
9 changes: 0 additions & 9 deletions src/browser/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions src/browser/TestUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down
3 changes: 0 additions & 3 deletions src/browser/public/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion test/playwright/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> { return this.evaluate(([term]) => term.input(data)); }
public async resize(cols: number, rows: number): Promise<void> { 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<IMarker> { return this._page.evaluate(([term, y]) => term.registerMarker(y), [await this.getHandle(), y] as const); }
public async registerDecoration(decorationOptions: IDecorationOptions): Promise<IDecoration | undefined> { return this._page.evaluate(([term, decorationOptions]) => term.registerDecoration(decorationOptions), [await this.getHandle(), decorationOptions] as const); }
Expand Down
6 changes: 0 additions & 6 deletions typings/xterm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cd557f8

Please sign in to comment.