Fix on paste or cut text might trigger syncscroll

This commit is contained in:
Cheng-Han, Wu 2016-05-16 23:02:59 +08:00
parent eb5873a94d
commit 97befb6238
2 changed files with 8 additions and 2 deletions

View file

@ -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;