diff --git a/main.ts b/main.ts index db13912..25fa589 100644 --- a/main.ts +++ b/main.ts @@ -461,6 +461,11 @@ export default class LoomPlugin extends Plugin { ); this.editor.setValue(this.fullText(id, this.state[file.path])); + + const lines = this.editor.getValue().split("\n"); + const line = lines.length - 1; + const ch = lines[line].length; + this.editor.setCursor({ line, ch }); }) ) );