Bug 940713 - Enable autoclose brackets for source editor. r=anton
authorGabriel Luong <gabriel.luong@gmail.com>
Mon, 25 Nov 2013 15:57:51 -0800
changeset 172112 e37495564adaed5103783ef8f4843067f5d49190
parent 172111 b6cbed05a206c4532e70024ac7acc191b9045e18
child 172113 dbca16978da79a725d279a6e008f90aa8c17dc60
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersanton
bugs940713
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 940713 - Enable autoclose brackets for source editor. r=anton
browser/devtools/sourceeditor/editor.js
--- a/browser/devtools/sourceeditor/editor.js
+++ b/browser/devtools/sourceeditor/editor.js
@@ -117,26 +117,27 @@ Editor.modes = {
  * CodeMirror docs: http://codemirror.net/doc/manual.html
  */
 function Editor(config) {
   const tabSize = Services.prefs.getIntPref(TAB_SIZE);
   const useTabs = !Services.prefs.getBoolPref(EXPAND_TAB);
 
   this.version = null;
   this.config = {
-    value:           "",
-    mode:            Editor.modes.text,
-    indentUnit:      tabSize,
-    tabSize:         tabSize,
-    contextMenu:     null,
-    matchBrackets:   true,
-    extraKeys:       {},
-    indentWithTabs:  useTabs,
-    styleActiveLine: true,
-    theme: "mozilla"
+    value:             "",
+    mode:              Editor.modes.text,
+    indentUnit:        tabSize,
+    tabSize:           tabSize,
+    contextMenu:       null,
+    matchBrackets:     true,
+    extraKeys:         {},
+    indentWithTabs:    useTabs,
+    styleActiveLine:   true,
+    autoCloseBrackets: true,
+    theme:             "mozilla"
   };
 
   // Additional shortcuts.
   this.config.extraKeys[Editor.keyFor("jumpToLine")] = (cm) => this.jumpToLine(cm);
   this.config.extraKeys[Editor.keyFor("toggleComment")] = "toggleComment";
 
   // Disable ctrl-[ and ctrl-] because toolbox uses those shortcuts.
   this.config.extraKeys[Editor.keyFor("indentLess")] = false;