Skip to content

Commit

Permalink
Merge pull request xtermjs#5034 from Tyriar/tyriar/update_cursor_still
Browse files Browse the repository at this point in the history
Expose onWriteParsed on API
  • Loading branch information
Tyriar authored Apr 18, 2024
2 parents d2b8e6c + 8458bb4 commit 47a4687
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/headless/public/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export class Terminal extends Disposable implements ITerminalApi {
public get onResize(): IEvent<{ cols: number, rows: number }> { return this._core.onResize; }
public get onScroll(): IEvent<number> { return this._core.onScroll; }
public get onTitleChange(): IEvent<string> { return this._core.onTitleChange; }
public get onWriteParsed(): IEvent<void> { return this._core.onWriteParsed; }

public get parser(): IParser {
this._checkProposedApi();
Expand Down
11 changes: 11 additions & 0 deletions typings/xterm-headless.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,17 @@ declare module '@xterm/headless' {
*/
onLineFeed: IEvent<void>;

/**
* Adds an event listener for when data has been parsed by the terminal,
* after {@link write} is called. This event is useful to listen for any
* changes in the buffer.
*
* This fires at most once per frame, after data parsing completes. Note
* that this can fire when there are still writes pending if there is a lot
* of data.
*/
onWriteParsed: IEvent<void>;

/**
* Adds an event listener for when the terminal is resized. The event value
* contains the new size.
Expand Down

0 comments on commit 47a4687

Please sign in to comment.