mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Allow refreshing all rows without creating object
This commit is contained in:
@@ -160,7 +160,7 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
|
||||
|
||||
// Setup InputHandler listeners
|
||||
this.register(this._inputHandler.onRequestBell(() => this._onBell.fire()));
|
||||
this.register(this._inputHandler.onRequestRefreshRows((e) => this.refresh(e.start, e.end)));
|
||||
this.register(this._inputHandler.onRequestRefreshRows((e) => this.refresh(e?.start ?? 0, e?.end ?? (this.rows - 1))));
|
||||
this.register(this._inputHandler.onRequestSendFocus(() => this._reportFocus()));
|
||||
this.register(this._inputHandler.onRequestReset(() => this.reset()));
|
||||
this.register(this._inputHandler.onRequestWindowsOptionsReport(type => this._reportWindowsOptions(type)));
|
||||
|
||||
@@ -134,7 +134,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
|
||||
private readonly _onRequestBell = this.register(new Emitter<void>());
|
||||
public readonly onRequestBell = this._onRequestBell.event;
|
||||
private readonly _onRequestRefreshRows = this.register(new Emitter<{ start: number, end: number }>());
|
||||
private readonly _onRequestRefreshRows = this.register(new Emitter<{ start: number, end: number } | undefined>());
|
||||
public readonly onRequestRefreshRows = this._onRequestRefreshRows.event;
|
||||
private readonly _onRequestReset = this.register(new Emitter<void>());
|
||||
public readonly onRequestReset = this._onRequestReset.event;
|
||||
@@ -1946,10 +1946,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
case 1047: // alt screen buffer
|
||||
this._bufferService.buffers.activateAltBuffer(this._eraseAttrData());
|
||||
this._coreService.isCursorInitialized = true;
|
||||
this._onRequestRefreshRows.fire({
|
||||
start: 0,
|
||||
end: this._bufferService.rows - 1
|
||||
});
|
||||
this._onRequestRefreshRows.fire(undefined);
|
||||
this._onRequestSyncScrollBar.fire();
|
||||
break;
|
||||
case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)
|
||||
@@ -2177,10 +2174,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
this.restoreCursor();
|
||||
}
|
||||
this._coreService.isCursorInitialized = true;
|
||||
this._onRequestRefreshRows.fire({
|
||||
start: 0,
|
||||
end: this._bufferService.rows - 1
|
||||
});
|
||||
this._onRequestRefreshRows.fire(undefined);
|
||||
this._onRequestSyncScrollBar.fire();
|
||||
break;
|
||||
case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)
|
||||
|
||||
Reference in New Issue
Block a user