From bec4cde986975d1cc5f1d2791fdb18548fc2d72a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 4 Apr 2012 13:17:45 -0700 Subject: - fix for current line highlighting for version 2.23 - changes to not show autocomplete dropdown for brackets Signed-off-by: Ananya Sen --- js/stage/stage-view.reel/stage-view.js | 13 ++++++++++--- 1 file 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, { }, onCursorActivity: function() { doc.editor.matchHighlight("CodeMirror-matchhighlight"); - doc.editor.setLineClass(doc.editor.hline, null); - doc.editor.hline = doc.editor.setLineClass(doc.editor.getCursor().line, "activeline"); + doc.editor.setLineClass(doc.editor.hline, null, null); + doc.editor.hline = doc.editor.setLineClass(doc.editor.getCursor().line, null, "activeline"); }, //extraKeys: {"Ctrl-Space": function(cm) {CodeMirror.simpleHint(cm, CodeMirror.javascriptHint);}} onKeyEvent: function(cm, keyEvent) { @@ -117,7 +117,14 @@ exports.StageView = Montage.create(Component, { || (keyEvent.keyCode > 64 && keyEvent.keyCode <91)//letters || (keyEvent.keyCode === 190)//period || (keyEvent.keyCode === 189)//underscore, dash - ) + ) + && !( (keyEvent.keyCode === 219)//open bracket [ + || (keyEvent.keyCode === 221)//close bracket ] + || (keyEvent.shiftKey && keyEvent.keyCode === 219)//open bracket { + || (keyEvent.shiftKey && keyEvent.keyCode === 221)//close bracket } + || (keyEvent.shiftKey && keyEvent.keyCode === 57)//open bracket ( + || (keyEvent.shiftKey && keyEvent.keyCode === 48)//close bracket ) + ) ){ CodeMirror.simpleHint(cm, CodeMirror.javascriptHint); -- cgit v1.2.3