fix(edit) set first undo

This commit is contained in:
coderaiser 2014-04-15 11:12:09 -04:00
parent 2c0881edda
commit 1cb310cada

View file

@ -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();
});
});
}
};