summaryrefslogtreecommitdiff
path: root/public/js/syncscroll.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/syncscroll.js')
-rw-r--r--public/js/syncscroll.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/public/js/syncscroll.js b/public/js/syncscroll.js
index f0c7491b..de08ee39 100644
--- a/public/js/syncscroll.js
+++ b/public/js/syncscroll.js
@@ -257,7 +257,11 @@ function getEditorLineNoByTop(top) {
function syncScrollToView(event, _lineNo) {
if (currentMode != modeType.both) return;
if (preventSyncScroll) {
- preventSyncScroll = false;
+ if (typeof preventSyncScroll === 'number') {
+ preventSyncScroll--;
+ } else {
+ preventSyncScroll = false;
+ }
return;
}
var lineNo, posTo;