Index: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
diff --git a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
index 35e9ed2f95c8b8ea7fcc679d07d88be4f929bf27..353315246de4ab2c4c50edcc243610ed4dab48ad 100644 |
--- a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
+++ b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js |
@@ -112,6 +112,7 @@ WebInspector.CodeMirrorTextEditor = function(url, delegate) |
}; |
WebInspector.settings.textEditorIndent.addChangeListener(this._updateEditorIndentation, this); |
+ WebInspector.settings.textEditorAutoDetectIndent.addChangeListener(this._updateEditorIndentation, this); |
this._updateEditorIndentation(); |
WebInspector.settings.showWhitespacesInEditor.addChangeListener(this._updateCodeMirrorMode, this); |
WebInspector.settings.textEditorBracketMatching.addChangeListener(this._enableBracketMatchingIfNeeded, this); |
@@ -275,6 +276,7 @@ WebInspector.CodeMirrorTextEditor.prototype = { |
dispose: function() |
{ |
WebInspector.settings.textEditorIndent.removeChangeListener(this._updateEditorIndentation, this); |
+ WebInspector.settings.textEditorAutoDetectIndent.removeChangeListener(this._updateEditorIndentation, this); |
WebInspector.settings.showWhitespacesInEditor.removeChangeListener(this._updateCodeMirrorMode, this); |
WebInspector.settings.textEditorBracketMatching.removeChangeListener(this._enableBracketMatchingIfNeeded, this); |
}, |
@@ -327,7 +329,7 @@ WebInspector.CodeMirrorTextEditor.prototype = { |
minimumIndent = indent; |
} |
if (minimumIndent === Infinity) |
- return WebInspector.TextUtils.Indent.FourSpaces; |
+ return WebInspector.settings.textEditorIndent.get(); |
return new Array(minimumIndent + 1).join(" "); |
}, |