保存时滚动条重置

This commit is contained in:
Liang Ding 2014-10-21 14:42:29 +08:00
parent 420d1bd064
commit 9204ce291a
1 changed files with 2 additions and 0 deletions

View File

@ -570,6 +570,7 @@ var wide = {
var mode = curEditor.getOption("mode"); var mode = curEditor.getOption("mode");
var cursor = curEditor.getCursor(); var cursor = curEditor.getCursor();
var scrollInfo = curEditor.getScrollInfo();
var request = newWideRequest(); var request = newWideRequest();
request.file = path; request.file = path;
@ -588,6 +589,7 @@ var wide = {
if (data.succ) { if (data.succ) {
curEditor.setValue(data.code); curEditor.setValue(data.code);
curEditor.setCursor(cursor); curEditor.setCursor(cursor);
curEditor.scrollTo(null, scrollInfo.top);
} }
} }
}); });