diff options
| author | jez | 2011-05-14 21:47:25 -0400 | 
|---|---|---|
| committer | jez | 2011-05-14 21:47:25 -0400 | 
| commit | 83e29416c6afeac5c2718bd8bdb64212c4ea8667 (patch) | |
| tree | 9b8ca9717885c65be2d2a20b60260903f2c5db5f /linkHints.js | |
| parent | d6e059f2a3b8db7695de3851d48e62a6ca925af9 (diff) | |
| download | vimium-83e29416c6afeac5c2718bd8bdb64212c4ea8667.tar.bz2 | |
Stop looping over array once we have modified it.
Closes bug introduced by commit 94ca405e.
Diffstat (limited to 'linkHints.js')
| -rw-r--r-- | linkHints.js | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/linkHints.js b/linkHints.js index 7eb40b71..c8c743ea 100644 --- a/linkHints.js +++ b/linkHints.js @@ -470,8 +470,10 @@ var filterHints = {      } else if (event.keyCode == keyCodes.enter) {          // activate the lowest-numbered link hint that is visible          for (var i = 0, count = linksMatched.length; i < count; i++) -          if (linksMatched[i].style.display  != 'none') +          if (linksMatched[i].style.display  != 'none') {              linksMatched = [ linksMatched[i] ]; +            break; +          }      } else if (keyChar) {        var matchString;        if (/[0-9]/.test(keyChar)) { | 
