From 471359c0be163f9f794e3b5cf1b0f6524b1e04d4 Mon Sep 17 00:00:00 2001 From: AdoKevin Date: Mon, 21 Aug 2023 22:09:22 +0800 Subject: [PATCH] feat: change cursor by default --- src/jump.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jump.ts b/src/jump.ts index 5c82f2c..34062ae 100644 --- a/src/jump.ts +++ b/src/jump.ts @@ -1,5 +1,6 @@ import { Range, + Selection, TextEditorRevealType, commands, type DocumentSymbol, @@ -29,6 +30,7 @@ export async function jumpTo(target: JumpType, textEditor: TextEditor, cache?: D if (targetRange) { textEditor.revealRange(targetRange, TextEditorRevealType.InCenter); + textEditor.selection = new Selection(targetRange.start, targetRange.start); } } }