From eba58270923b7d76bfb969fe880ccf98f8073140 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 3 Jan 2021 11:36:19 +0000 Subject: [PATCH] working x offset logic bugfix --- src/static/js/ace2_inner.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 273e51699..e366a5ef4 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3063,7 +3063,10 @@ function Ace2Inner() { rep.selStart[1], rep.selEnd[1], ]; + } else { + previousCharacterOffset = [0, 0]; } + top.console.log('previousCharacterOffset', previousCharacterOffset); // boolean - reflects if the user is attempting to highlight content const highlighting = shiftKey && (rep.selStart[0] !== rep.selEnd[0] || rep.selStart[1] !== rep.selEnd[1]);