Skip to content

Commit

Permalink
Commando: Fix right arrow is always expanding - fixes #2730
Browse files Browse the repository at this point in the history
(integrated from the KomodoIDE master branch change d4d720f385 by Nathan Rijksen <[email protected]>)

Komodo/KomodoIDE@d4d720f385
  • Loading branch information
Naatan committed Aug 2, 2017
1 parent fe99e7c commit 41c0978
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/modules/commando/content/sdk/commando.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,14 @@
onNavUp(e);
prevDefault = true;
break;
case KeyEvent.DOM_VK_RIGHT:
case KeyEvent.DOM_VK_RIGHT:
onExpandResult(e);
break;
case KeyEvent.DOM_VK_ALT:
local.altPressed = true;
break;
}

var numberNav = prefs.getBoolean('commando_navigate_by_number', true);
numberNav = numberNav && ! local.prevSearchValue;
if (numberNav || (local.altPressed && e.keyCode != KeyEvent.DOM_VK_ALT))
Expand Down Expand Up @@ -517,13 +517,11 @@
var resultElem = elem('results').element();
resultElem.selectedItem = target;
}

e.preventDefault();
e.stopPropagation();
}
else

var textbox = elem("search").element();
if ( ! e || e.currentTarget == textbox)
{
var textbox = elem("search").element();

if (textbox.selectionEnd != textbox.selectionStart ||
textbox.selectionStart < textbox.value.length)
Expand All @@ -539,6 +537,12 @@
return;

c.expandResult(selected);

if (e)
{
e.preventDefault();
e.stopPropagation();
}
}

var onChangeScope = function(e)
Expand Down

0 comments on commit 41c0978

Please sign in to comment.