Skip to content

Commit 8af7841

Browse files
committed
Fixed syncscroll might have duplicated and wrong scrollMap if editor not shown
1 parent a2fbafb commit 8af7841

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

public/js/syncscroll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function buildMapInner(syncBack) {
218218
return;
219219
}
220220
t = _lineHeightMap[t];
221-
if (t !== 0) {
221+
if (t !== 0 && t !== nonEmptyList[nonEmptyList.length - 1]) {
222222
nonEmptyList.push(t);
223223
}
224224
_scrollMap[t] = Math.round($el.offset().top + offset - 10);

0 commit comments

Comments
 (0)