From ef93a58e6dfbda10d4e7c397bbc27c031a75d413 Mon Sep 17 00:00:00 2001 From: Unarray <48868686+Unarray@users.noreply.github.com> Date: Thu, 24 Aug 2023 10:19:53 +0200 Subject: [PATCH] Use cursor `head` position instead of `to` --- src/commands/GenerateTree.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/GenerateTree.ts b/src/commands/GenerateTree.ts index 00bbfde..0da8542 100644 --- a/src/commands/GenerateTree.ts +++ b/src/commands/GenerateTree.ts @@ -24,7 +24,7 @@ export class GenerateTree implements Command { const files = (await getFiles(selectedPath)).map(file => file.replace(regex, "")); const structure = filesToExplorerEntity(files); const callouts = explorerEntityToCallout(structure); - const cursorLine = editor.getCursor("to").line; + const cursorLine = editor.getCursor("head").line; editor.setLine( cursorLine,