Allow refreshing all rows without creating object

This commit is contained in:
Daniel Imms
2024-07-14 09:05:18 -07:00
parent b6b19babc1
commit bd700fe515
2 changed files with 4 additions and 10 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
// Setup InputHandler listeners // Setup InputHandler listeners
this.register(this._inputHandler.onRequestBell(() => this._onBell.fire())); 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.onRequestSendFocus(() => this._reportFocus()));
this.register(this._inputHandler.onRequestReset(() => this.reset())); this.register(this._inputHandler.onRequestReset(() => this.reset()));
this.register(this._inputHandler.onRequestWindowsOptionsReport(type => this._reportWindowsOptions(type))); this.register(this._inputHandler.onRequestWindowsOptionsReport(type => this._reportWindowsOptions(type)));
+3 -9
View File
@@ -134,7 +134,7 @@ export class InputHandler extends Disposable implements IInputHandler {
private readonly _onRequestBell = this.register(new Emitter<void>()); private readonly _onRequestBell = this.register(new Emitter<void>());
public readonly onRequestBell = this._onRequestBell.event; 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; public readonly onRequestRefreshRows = this._onRequestRefreshRows.event;
private readonly _onRequestReset = this.register(new Emitter<void>()); private readonly _onRequestReset = this.register(new Emitter<void>());
public readonly onRequestReset = this._onRequestReset.event; public readonly onRequestReset = this._onRequestReset.event;
@@ -1946,10 +1946,7 @@ export class InputHandler extends Disposable implements IInputHandler {
case 1047: // alt screen buffer case 1047: // alt screen buffer
this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()); this._bufferService.buffers.activateAltBuffer(this._eraseAttrData());
this._coreService.isCursorInitialized = true; this._coreService.isCursorInitialized = true;
this._onRequestRefreshRows.fire({ this._onRequestRefreshRows.fire(undefined);
start: 0,
end: this._bufferService.rows - 1
});
this._onRequestSyncScrollBar.fire(); this._onRequestSyncScrollBar.fire();
break; break;
case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste) 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.restoreCursor();
} }
this._coreService.isCursorInitialized = true; this._coreService.isCursorInitialized = true;
this._onRequestRefreshRows.fire({ this._onRequestRefreshRows.fire(undefined);
start: 0,
end: this._bufferService.rows - 1
});
this._onRequestSyncScrollBar.fire(); this._onRequestSyncScrollBar.fire();
break; break;
case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste) case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)