diff options
author | Ananya Sen | 2012-04-04 13:17:45 -0700 |
---|---|---|
committer | Ananya Sen | 2012-04-04 13:17:45 -0700 |
commit | bec4cde986975d1cc5f1d2791fdb18548fc2d72a (patch) | |
tree | bdedf108aa53347436e97a75671e3050b5a8dc48 /js | |
parent | 671d2b94996ac71d56b2d05d5fe694ed7d84fa59 (diff) | |
download | ninja-bec4cde986975d1cc5f1d2791fdb18548fc2d72a.tar.gz |
- fix for current line highlighting for version 2.23
- changes to not show autocomplete dropdown for brackets
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js index 43751559..917cbeb5 100755 --- a/js/stage/stage-view.reel/stage-view.js +++ b/js/stage/stage-view.reel/stage-view.js | |||
@@ -107,8 +107,8 @@ exports.StageView = Montage.create(Component, { | |||
107 | }, | 107 | }, |
108 | onCursorActivity: function() { | 108 | onCursorActivity: function() { |
109 | doc.editor.matchHighlight("CodeMirror-matchhighlight"); | 109 | doc.editor.matchHighlight("CodeMirror-matchhighlight"); |
110 | doc.editor.setLineClass(doc.editor.hline, null); | 110 | doc.editor.setLineClass(doc.editor.hline, null, null); |
111 | doc.editor.hline = doc.editor.setLineClass(doc.editor.getCursor().line, "activeline"); | 111 | doc.editor.hline = doc.editor.setLineClass(doc.editor.getCursor().line, null, "activeline"); |
112 | }, | 112 | }, |
113 | //extraKeys: {"Ctrl-Space": function(cm) {CodeMirror.simpleHint(cm, CodeMirror.javascriptHint);}} | 113 | //extraKeys: {"Ctrl-Space": function(cm) {CodeMirror.simpleHint(cm, CodeMirror.javascriptHint);}} |
114 | onKeyEvent: function(cm, keyEvent) { | 114 | onKeyEvent: function(cm, keyEvent) { |
@@ -117,7 +117,14 @@ exports.StageView = Montage.create(Component, { | |||
117 | || (keyEvent.keyCode > 64 && keyEvent.keyCode <91)//letters | 117 | || (keyEvent.keyCode > 64 && keyEvent.keyCode <91)//letters |
118 | || (keyEvent.keyCode === 190)//period | 118 | || (keyEvent.keyCode === 190)//period |
119 | || (keyEvent.keyCode === 189)//underscore, dash | 119 | || (keyEvent.keyCode === 189)//underscore, dash |
120 | ) | 120 | ) |
121 | && !( (keyEvent.keyCode === 219)//open bracket [ | ||
122 | || (keyEvent.keyCode === 221)//close bracket ] | ||
123 | || (keyEvent.shiftKey && keyEvent.keyCode === 219)//open bracket { | ||
124 | || (keyEvent.shiftKey && keyEvent.keyCode === 221)//close bracket } | ||
125 | || (keyEvent.shiftKey && keyEvent.keyCode === 57)//open bracket ( | ||
126 | || (keyEvent.shiftKey && keyEvent.keyCode === 48)//close bracket ) | ||
127 | ) | ||
121 | ){ | 128 | ){ |
122 | 129 | ||
123 | CodeMirror.simpleHint(cm, CodeMirror.javascriptHint); | 130 | CodeMirror.simpleHint(cm, CodeMirror.javascriptHint); |