From 224c113b645b4fcac1fd9a6d98c6403311d8f726 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 27 May 2026 19:36:45 +0000 Subject: [PATCH] Move linkId declaration above use site in print loop Co-authored-by: Daniel Imms --- src/common/InputHandler.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index ef07aa05e..fd1fdb8a1 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -531,8 +531,6 @@ 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 @@ -569,6 +567,7 @@ export class InputHandler extends Disposable implements IInputHandler { if (screenReaderMode) { this._onA11yChar.fire(stringFromCodePoint(code)); } + const linkId = this._getCurrentLinkId(); if (linkId) { this._oscLinkService.addLineToLink(linkId, this._activeBuffer.ybase + this._activeBuffer.y); }