Skip to content

Commit

Permalink
Tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Feb 2, 2024
1 parent b1a72b2 commit 8d1771e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 34 deletions.
9 changes: 0 additions & 9 deletions src/common/CoreTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,6 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
this._writeBuffer.writeSync(data, maxSubsequentCalls);
}

/**
* Input data to application side.
* The data is treated the same way as typed input at the terminal.
* (will appear in the onData event).
* wasUserInput indicates, whether the input is genuine user input.
* It is true by default and triggers additional actions like prompt focus or selection clearing.
* Set it to false if your data sent does not resemble what a user would have typed
* (e.g. sequence embedded data).
*/
public input(data: string, wasUserInput: boolean = true): void {
this.coreService.triggerDataEvent(data, wasUserInput);
}
Expand Down
9 changes: 0 additions & 9 deletions src/headless/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ export class Terminal extends CoreTerminal {
this._onBell.fire();
}

/**
* Input data to application side.
* The data is treated the same way as typed input at the terminal.
* (will appear in the onData event).
* wasUserInput indicates, whether the input is genuine user input.
* It is true by default and triggers additional actions like prompt focus or selection clearing.
* Set it to false if your data sent does not resemble what a user would have typed
* (e.g. sequence embedded data).
*/
public input(data: string, wasUserInput: boolean = true): void {
this.coreService.triggerDataEvent(data, wasUserInput);
}
Expand Down
16 changes: 8 additions & 8 deletions typings/xterm-headless.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,14 +719,14 @@ declare module '@xterm/headless' {
onTitleChange: IEvent<string>;

/**
* Input data to application side.
* The data is treated the same way as typed input at the terminal
* (will appear in the onData event).
* wasUserInput indicates, whether the input is genuine user input.
* It is true by default and triggers additional actions like prompt
* focus or selection clearing.
* Set it to false if your data sent does not resemble
* what a user would have typed (e.g. sequence embedded data).
* Input data to application side. The data is treated the same way input
* typed into the terminal would (ie. the {@link onData} event will fire).
* @param data The data to forward to the application.
* @param wasUserInput Whether the input is genuine user input. This is true
* by default and triggers additionalbehavior like focus or selection
* clearing. Set this to false if the data sent should not be treated like
* user input would, for example passing an escape sequence to the
* application.
*/
input(data: string, wasUserInput?: boolean): void;

Expand Down
16 changes: 8 additions & 8 deletions typings/xterm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -964,14 +964,14 @@ declare module '@xterm/xterm' {
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).
* wasUserInput indicates, whether the input is genuine user input.
* It is true by default and triggers additional actions like prompt
* focus or selection clearing.
* Set it to false if your data sent does not resemble
* what a user would have typed (e.g. sequence embedded data).
* Input data to application side. The data is treated the same way input
* typed into the terminal would (ie. the {@link onData} event will fire).
* @param data The data to forward to the application.
* @param wasUserInput Whether the input is genuine user input. This is true
* by default and triggers additionalbehavior like focus or selection
* clearing. Set this to false if the data sent should not be treated like
* user input would, for example passing an escape sequence to the
* application.
*/
input(data: string, wasUserInput?: boolean): void;

Expand Down

0 comments on commit 8d1771e

Please sign in to comment.