From 217bc242355dd261f9fb9bf2e4a3e4b726329809 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 24 Nov 2019 11:15:28 -0800 Subject: [PATCH] Mark before and after cursor rows dirty when changed The DOM renderer renders the cursor as part of the content, not on a separate layer, so it needs to be marked dirty to draw. Fixes #2581 --- src/InputHandler.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/InputHandler.ts b/src/InputHandler.ts index 3994d532cd..7a0a6ac32e 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -546,6 +546,7 @@ export class InputHandler extends Disposable implements IInputHandler { // make buffer local for faster access const buffer = this._bufferService.buffer; + this._dirtyRowService.markDirty(buffer.y); if (this._optionsService.options.convertEol) { buffer.x = 0; } @@ -560,6 +561,7 @@ export class InputHandler extends Disposable implements IInputHandler { if (buffer.x >= this._bufferService.cols) { buffer.x--; } + this._dirtyRowService.markDirty(buffer.y); this._onLineFeed.fire(); } @@ -624,12 +626,14 @@ export class InputHandler extends Disposable implements IInputHandler { this._bufferService.buffer.y = this._terminal.originMode ? Math.min(this._bufferService.buffer.scrollBottom, Math.max(this._bufferService.buffer.scrollTop, this._bufferService.buffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._bufferService.buffer.y)); + this._dirtyRowService.markDirty(this._bufferService.buffer.y); } /** * Set absolute cursor position. */ private _setCursor(x: number, y: number): void { + this._dirtyRowService.markDirty(this._bufferService.buffer.y); if (this._terminal.originMode) { this._bufferService.buffer.x = x; this._bufferService.buffer.y = this._bufferService.buffer.scrollTop + y; @@ -638,6 +642,7 @@ export class InputHandler extends Disposable implements IInputHandler { this._bufferService.buffer.y = y; } this._restrictCursor(); + this._dirtyRowService.markDirty(this._bufferService.buffer.y); } /**