From ccd7998112740e8f19efd2bdcab0be1c2b04bbc7 Mon Sep 17 00:00:00 2001 From: Niklas Baumstark Date: Wed, 25 Jan 2012 02:04:11 +0100 Subject: correctly handle selection after refresh --- fuzzyMode.js | 1 + 1 file changed, 1 insertion(+) 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' : ''; }, -- cgit v1.2.3