diff options
author | Ananya Sen | 2012-06-26 13:04:04 -0700 |
---|---|---|
committer | Ananya Sen | 2012-06-26 13:04:04 -0700 |
commit | 6075916ef18dc4a8cbea41c941d2d0b519360262 (patch) | |
tree | 7ee9798bed5c722f5f0bba92626aaf3348fe660b /js/controllers | |
parent | dea90d1bb0b903a7497cdf7de9ae60799e60d5b1 (diff) | |
download | ninja-6075916ef18dc4a8cbea41c941d2d0b519360262.tar.gz |
fixed code hinting and autocompletion bug
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/controllers')
-rw-r--r-- | js/controllers/code-editor-controller.js | 5 |
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){ |