summaryrefslogtreecommitdiff
path: root/public/js/syncscroll.js
diff options
context:
space:
mode:
authorWu Cheng-Han2016-01-12 07:47:02 -0600
committerWu Cheng-Han2016-01-12 07:47:02 -0600
commit8af7841de331a8e65fb8d5968f35e210ac508e6e (patch)
treef4011402300173dc21c221f8e5b4eec4d224ebaf /public/js/syncscroll.js
parenta2fbafb6aa900d4a1e7eb60b667ea485cd28f613 (diff)
Fixed syncscroll might have duplicated and wrong scrollMap if editor not shown
Diffstat (limited to 'public/js/syncscroll.js')
-rw-r--r--public/js/syncscroll.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/syncscroll.js b/public/js/syncscroll.js
index faa6a6a4..c3793a88 100644
--- a/public/js/syncscroll.js
+++ b/public/js/syncscroll.js
@@ -218,7 +218,7 @@ function buildMapInner(syncBack) {
return;
}
t = _lineHeightMap[t];
- if (t !== 0) {
+ if (t !== 0 && t !== nonEmptyList[nonEmptyList.length - 1]) {
nonEmptyList.push(t);
}
_scrollMap[t] = Math.round($el.offset().top + offset - 10);