From 5536821d2e860d9e2bf7cc42beafa022509968a7 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 5 Jul 2023 15:48:25 +0200 Subject: [PATCH] changed: absolute cursor pos in info fixed: cursor pos upon opening (modulo header) --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 4595190..b7f926b 100644 --- a/main.js +++ b/main.js @@ -516,7 +516,7 @@ function showinfo() [ "saved: " + saved, "title: " + currentnote.title, - "cursor position: " + (100 * md.selectionStart / md.value.length).toFixed(2) + "%", + "cursor position: " + md.selectionStart + " (" + (100 * md.selectionStart / md.value.length).toFixed(2) + "%)", "vault: " + currentvault, (tags ? "tags: " + tags : ""), "spell check: " + (md.spellcheck ? "en" : "dis") + "abled", @@ -2389,8 +2389,6 @@ function bindfile(note) } resize(); - setpos(note.pos || 0); - // to improve... if (!issplit() && searchdialog.hidden) { @@ -2402,6 +2400,8 @@ function bindfile(note) { toggleheader(); } + + setpos(note.pos || 0); } function loadnote(name)