diff options
author | suelockwood <deathbear@apache.org> | 2014-02-25 14:58:26 -0500 |
---|---|---|
committer | suelockwood <deathbear@apache.org> | 2014-02-25 14:58:36 -0500 |
commit | e0b860d0f1e024c1fd691a643dc65a4aa5d302c1 (patch) | |
tree | ebd8bf6b96d3bc4f7dfcf1147d6a41fa4d0bc242 | |
parent | 17a97631fdbb3c45dd82081b51e9cf26c39fb884 (diff) | |
download | couchdb-e0b860d0f1e024c1fd691a643dc65a4aa5d302c1.tar.gz |
Remove editor reference to go to line 2 to stop browsers from crashing on people who have minified index functions.
-rw-r--r-- | src/fauxton/app/addons/fauxton/components.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fauxton/app/addons/fauxton/components.js b/src/fauxton/app/addons/fauxton/components.js index 8b21916a5..39c213df7 100644 --- a/src/fauxton/app/addons/fauxton/components.js +++ b/src/fauxton/app/addons/fauxton/components.js @@ -284,11 +284,11 @@ function(app, FauxtonAPI, ace, spin) { afterRender: function () { this.editor = ace.edit(this.editorId); this.setHeightToLineCount(); + this.editor.getSession().setUseWorker(false); this.editor.setTheme("ace/theme/" + this.theme); + this.editor.getSession().setMode("ace/mode/" + this.mode); - this.editor.getSession().setUseWrapMode(true); this.editor.setShowPrintMargin(false); - this.editor.gotoLine(2); this.addCommands(); if (this.couchJSHINT) { @@ -329,7 +329,8 @@ function(app, FauxtonAPI, ace, spin) { }, getLines: function(){ - return this.editor.getSession().getDocument().getLength(); + return 5; + // return this.editor.getSession().getDocument().getLength(); }, addCommands: function () { |