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,