diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index 33e954811..ef07aa05e 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -531,6 +531,8 @@ export class InputHandler extends Disposable implements IInputHandler { return; } + const linkId = this._getCurrentLinkId(); + this._dirtyRowTracker.markDirty(this._activeBuffer.y); // handle wide chars: reset start_cell-1 if we would overwrite the second cell of a wide char @@ -567,8 +569,8 @@ export class InputHandler extends Disposable implements IInputHandler { if (screenReaderMode) { this._onA11yChar.fire(stringFromCodePoint(code)); } - if (this._getCurrentLinkId()) { - this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y); + if (linkId) { + this._oscLinkService.addLineToLink(linkId, this._activeBuffer.ybase + this._activeBuffer.y); } // goto next line if ch would overflow