mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
fix(edit) set first undo
This commit is contained in:
parent
2c0881edda
commit
1cb310cada
1 changed files with 13 additions and 6 deletions
|
|
@ -44,6 +44,8 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip;
|
|||
Ace.moveCursorTo(0, 0);
|
||||
};
|
||||
|
||||
Key.unsetBind();
|
||||
|
||||
if (!Loading) {
|
||||
Images.showLoad();
|
||||
|
||||
|
|
@ -105,19 +107,24 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch, Zip;
|
|||
}
|
||||
});
|
||||
|
||||
if (isStr) {
|
||||
Ace.setValue(value);
|
||||
|
||||
Util.ifExec(isStr, function() {
|
||||
var UndoManager = ace.require("ace/undomanager").UndoManager;
|
||||
|
||||
Ace.setValue(Value);
|
||||
CloudCmd.View.show(Element, focus);
|
||||
Key.unsetBind();
|
||||
} else
|
||||
|
||||
Session.setUndoManager(new UndoManager());
|
||||
}, function(callback) {
|
||||
Info.getData(function(data) {
|
||||
Value = data;
|
||||
Ace.setValue(data);
|
||||
CloudCmd.View.show(Element, focus);
|
||||
|
||||
if (isJS && Session.getUseWorker())
|
||||
setJsHintConfig();
|
||||
|
||||
callback();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue