From 6c2ed809929aa9248f07b7d47b616f1ea9334bcf Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 5 Jul 2023 09:42:33 +0200 Subject: [PATCH] changed: do not put on top upon opening. Allow explore back in history. --- main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 1ca0c5e..f2363ee 100644 --- a/main.js +++ b/main.js @@ -1536,7 +1536,11 @@ function loadlast() function loadprevious() { - loadnote(list()[1]); + var index = localdata.indexOf(currentnote); + if (index > -1) + { + loadnote(localdata[index + 1].title); + } } function grep(needle) @@ -1834,6 +1838,7 @@ function save() .then(() => { console.log("...data saved on server"); + putontop(); saved = true; }) .catch(remotecallfailed) @@ -1854,6 +1859,7 @@ function save() } else { + putontop(); saved = true; } } @@ -2395,7 +2401,6 @@ function loadnote(name) } bindfile(note); - putontop(); stat.cur.q = 0; stat.cur.d = 0;