kopia lustrzana https://github.com/c9/core
Small fix for debugger. Add ability to set undo manager for document
rodzic
325c9ae0ea
commit
bbf2cdb3c1
|
@ -65,7 +65,7 @@
|
|||
"c9.ide.find": "#989c06e6a7",
|
||||
"c9.ide.find.infiles": "#28b3cfcb47",
|
||||
"c9.ide.find.replace": "#43a6b95e6a",
|
||||
"c9.ide.run.debug": "#0c1f549611",
|
||||
"c9.ide.run.debug": "#36245ee2aa",
|
||||
"c9.ide.ace.emmet": "#e5f1a92ac3",
|
||||
"c9.ide.ace.gotoline": "#4d1a93172c",
|
||||
"c9.ide.ace.keymaps": "#1e42293fb9",
|
||||
|
|
|
@ -39,6 +39,7 @@ define(function(require, module, exports) {
|
|||
|
||||
// Listen to changes and detect when the value of the editor
|
||||
// is different from what is on disk
|
||||
function initUndo(){
|
||||
undoManager.on("change", function(e) {
|
||||
var c = !undoManager.isAtBookmark();
|
||||
if (changed !== c || undoManager.position == -1) {
|
||||
|
@ -46,6 +47,8 @@ define(function(require, module, exports) {
|
|||
emit("changed", { changed: c });
|
||||
}
|
||||
});
|
||||
}
|
||||
initUndo();
|
||||
|
||||
/***** Methods *****/
|
||||
|
||||
|
@ -401,6 +404,11 @@ define(function(require, module, exports) {
|
|||
* @property {UndoManager} undoManager
|
||||
*/
|
||||
get undoManager(){ return undoManager; },
|
||||
set undoManager(newUndo){
|
||||
undoManager.unload();
|
||||
undoManager = newUndo;
|
||||
initUndo();
|
||||
},
|
||||
|
||||
_events: [
|
||||
/**
|
||||
|
|
Ładowanie…
Reference in New Issue