From 6075916ef18dc4a8cbea41c941d2d0b519360262 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 26 Jun 2012 13:04:04 -0700 Subject: fixed code hinting and autocompletion bug Signed-off-by: Ananya Sen --- js/controllers/code-editor-controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js/controllers') 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, { if(!value) { } else if(this._currentDocument.currentView === "code") { - this.autocomplete = !this.codeCompletionSupport[this._currentDocument.model.file.extension]; + this.autocomplete = this.codeCompletionSupport[this._currentDocument.model.file.extension]; this._currentDocument.model.views.code.editor.focus(); this.applySettings(); } @@ -132,6 +132,9 @@ exports.CodeEditorController = Montage.create(Component, { }; //configure auto code completion if it is supported for that document type + + this.autocomplete = this.codeCompletionSupport[documentType]; + if(this.autocomplete) { editorOptions.onKeyEvent = function(cm, keyEvent){ -- cgit v1.2.3