Skip to content

Commit 3e6cc74

Browse files
committed
fix
1 parent 2d4f03d commit 3e6cc74

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/commands.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ export default {
139139
showFileInfo(url);
140140
},
141141
async goto() {
142-
const { editor } = editorManager;
143-
const lastLine = editor?.state?.doc?.lines;
142+
const lastLine = editorManager.editor?.state?.doc?.lines;
144143
const message = lastLine
145144
? `${strings["enter line number"]} (1..${lastLine})`
146145
: strings["enter line number"];
@@ -150,7 +149,7 @@ export default {
150149

151150
if (!res) return;
152151
const [lineStr, colStr] = String(res).split(".");
153-
editor.gotoLine(lineStr, colStr);
152+
editorManager.editor.gotoLine(lineStr, colStr);
154153
},
155154
async "new-file"() {
156155
let filename = await prompt(strings["enter file name"], "", "filename", {

0 commit comments

Comments
 (0)