From deae3c66d3ed28d9de4b818dbc5ad4e7e93d0f54 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 18 Jul 2025 12:33:20 -0700 Subject: [PATCH] feat: render jump suggestion at the location of the next decoration when the decoration should be rendered inside the viewport --- extensions/vscode/src/activation/JumpManager.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/extensions/vscode/src/activation/JumpManager.ts b/extensions/vscode/src/activation/JumpManager.ts index 66036ae08..b459f1002 100644 --- a/extensions/vscode/src/activation/JumpManager.ts +++ b/extensions/vscode/src/activation/JumpManager.ts @@ -60,7 +60,12 @@ export class JumpManager { ); } else { // No suggestion is made when the decoration is within visibleRange. - return; + await this.renderTabToJumpDecoration( + editor, + decorationLine, + nextJumpLocation, + ); + // return; } // Scroll to show the jump location. @@ -92,8 +97,14 @@ export class JumpManager { }); // Apply the decoration. + const lastIndexOfLine = editor.document.lineAt(lineToRenderOn).text.length; editor.setDecorations(this._jumpDecoration, [ - new vscode.Range(lineToRenderOn, 0, lineToRenderOn, 0), + new vscode.Range( + lineToRenderOn, + lastIndexOfLine, + lineToRenderOn, + lastIndexOfLine, + ), ]); // Set the context key to enable tab/esc shortcuts.