aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fuzzyMode.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/fuzzyMode.js b/fuzzyMode.js
index 8d8f1412..e927a0a4 100644
--- a/fuzzyMode.js
+++ b/fuzzyMode.js
@@ -84,6 +84,7 @@ var fuzzyMode = (function() {
},
updateSelection: function() {
+ 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' : '';
},