diff options
| author | Niklas Baumstark | 2012-01-24 23:33:07 +0100 |
|---|---|---|
| committer | Niklas Baumstark | 2012-04-10 23:54:38 +0200 |
| commit | 9fd6faa0d5d0b9cda83e9595054c66822c2cbd72 (patch) | |
| tree | 1c458fc7d9a74966d23a208003c9d3f09df49e95 /fuzzyMode.js | |
| parent | 6463714d0f477b35d3d8f533eafbe980ada0bf05 (diff) | |
| download | vimium-9fd6faa0d5d0b9cda83e9595054c66822c2cbd72.tar.bz2 | |
hide completion list if no completions are available
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 9e3b09e0..c3b20096 100644 --- a/fuzzyMode.js +++ b/fuzzyMode.js @@ -152,7 +152,6 @@ var fuzzyMode = (function() { this.completionList.style.display = 'none'; return; } - this.completionList.style.display = 'block'; var self = this; this.completer.filter(this.query, function(completions) { @@ -167,6 +166,8 @@ var fuzzyMode = (function() { li.innerHTML = completions[i].render(); self.completionList.appendChild(li); } + + self.completionList.style.display = completions.length > 0 ? 'block' : 'none'; self.updateSelection(); }); }, |
