aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/code-editor-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/code-editor-controller.js')
-rw-r--r--js/controllers/code-editor-controller.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/controllers/code-editor-controller.js b/js/controllers/code-editor-controller.js
index f3c19b92..4572d69a 100644
--- a/js/controllers/code-editor-controller.js
+++ b/js/controllers/code-editor-controller.js
@@ -32,7 +32,7 @@ exports.CodeEditorController = Montage.create(Component, {
32 if(!value) { 32 if(!value) {
33 33
34 } else if(this._currentDocument.currentView === "code") { 34 } else if(this._currentDocument.currentView === "code") {
35 this.autocomplete = !this.codeCompletionSupport[this._currentDocument.model.file.extension]; 35 this.autocomplete = this.codeCompletionSupport[this._currentDocument.model.file.extension];
36 this._currentDocument.model.views.code.editor.focus(); 36 this._currentDocument.model.views.code.editor.focus();
37 this.applySettings(); 37 this.applySettings();
38 } 38 }
@@ -132,6 +132,9 @@ exports.CodeEditorController = Montage.create(Component, {
132 }; 132 };
133 133
134 //configure auto code completion if it is supported for that document type 134 //configure auto code completion if it is supported for that document type
135
136 this.autocomplete = this.codeCompletionSupport[documentType];
137
135 if(this.autocomplete) { 138 if(this.autocomplete) {
136 139
137 editorOptions.onKeyEvent = function(cm, keyEvent){ 140 editorOptions.onKeyEvent = function(cm, keyEvent){