diff --git a/plugins/c9.ide.ace/ace.js b/plugins/c9.ide.ace/ace.js index b6919a99..c45d1371 100644 --- a/plugins/c9.ide.ace/ace.js +++ b/plugins/c9.ide.ace/ace.js @@ -2075,7 +2075,7 @@ define(function(require, exports, module) { /***** Lifecycle *****/ - //@todo set selection, scroll and file in header + // @todo set selection, scroll and file in header plugin.on("load", function(){ @@ -2102,7 +2102,7 @@ define(function(require, exports, module) { doc.on("setValue", function set(e) { var aceSession = c9Session.session; if (!aceSession) - return; //This is probably a deconstructed document + return; // This is probably a deconstructed document // The first value that is set should clear the undo stack // additional times setting the value should keep it. @@ -2115,7 +2115,7 @@ define(function(require, exports, module) { hideProgress(); } - if (e.state) + if (e.state) // There is nowhere where e.state is set. Dead code? setState(doc, e.state); if (currentDocument === doc) diff --git a/plugins/c9.ide.editors/document.js b/plugins/c9.ide.editors/document.js index 01cf170c..25f217ea 100644 --- a/plugins/c9.ide.editors/document.js +++ b/plugins/c9.ide.editors/document.js @@ -369,7 +369,7 @@ define(function(require, module, exports) { * @property {String} value */ get value(){ - var calculated = emit("getValue", {value: value}); + var calculated = emit("getValue", { value: recentValue || value }); if (typeof calculated != "string") calculated = value; diff --git a/plugins/c9.ide.editors/editor.js b/plugins/c9.ide.editors/editor.js index cb7f573f..d51d8646 100644 --- a/plugins/c9.ide.editors/editor.js +++ b/plugins/c9.ide.editors/editor.js @@ -205,7 +205,8 @@ define(function(require, module, exports) { /***** Register and define API *****/ - plugin.freezePublicAPI.baseclass(); + // This is a base class + plugin.baseclass(); /** * Editor base class for Cloud9 Editors. Each file that is opened diff --git a/plugins/c9.ide.editors/undomanager.js b/plugins/c9.ide.editors/undomanager.js index e5c6f5d9..c88355c2 100644 --- a/plugins/c9.ide.editors/undomanager.js +++ b/plugins/c9.ide.editors/undomanager.js @@ -137,7 +137,7 @@ define(function(require, module, exports) { } function findItem(compressedItem) { - return emit("itemFind", {state: compressedItem}); + return emit("itemFind", { state: compressedItem }); } function reset(){ @@ -205,8 +205,8 @@ define(function(require, module, exports) { * } * * var undoManager = new UndoManager(); - * undoManager.add(new Item("a", 0)); // data = ["a"] - * undoManager.add(new Item("b", 1)); // data = ["a", "b"] + * undoManager.add(new Item("a").redo()); // data = ["a"] + * undoManager.add(new Item("b").redo()); // data = ["a", "b"] * * undoManager.undo(); // data = ["a"]; * undoManager.undo(); // data = [];