diff options
| author | Niklas Baumstark | 2012-01-25 17:36:31 +0100 |
|---|---|---|
| committer | Niklas Baumstark | 2012-04-10 23:58:07 +0200 |
| commit | b23ec4bafe188dc584ebd2b674566d429198ae09 (patch) | |
| tree | 2448104de00136e7e148133cd6f38755c67c2ef3 /fuzzyMode.js | |
| parent | 66330ac3b5f4320ddf3d7c985f351eaa6886a9da (diff) | |
| download | vimium-b23ec4bafe188dc584ebd2b674566d429198ae09.tar.bz2 | |
fix small bug with selected item
Diffstat (limited to 'fuzzyMode.js')
| -rw-r--r-- | fuzzyMode.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fuzzyMode.js b/fuzzyMode.js index 8c71107b..29268505 100644 --- a/fuzzyMode.js +++ b/fuzzyMode.js @@ -84,7 +84,8 @@ var fuzzyMode = (function() { }, updateSelection: function() { - this.selection = Math.min(this.selection, this.completions.length - 1) + if (this.completions.length > 0) + this.selection = Math.min(this.selection, this.completions.length - 1); for (var i = 0; i < this.completionList.children.length; ++i) this.completionList.children[i].className = (i == this.selection) ? 'selected' : ''; }, |
