mirror of
https://github.com/cosmicoptima/loom.git
synced 2026-07-22 07:40:25 +00:00
set cursor position to end upon switching
This commit is contained in:
parent
7af61b0a70
commit
c20827ee29
1 changed files with 5 additions and 0 deletions
5
main.ts
5
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 });
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue