aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzyMode.js
diff options
context:
space:
mode:
authorNiklas Baumstark2012-01-24 23:28:33 +0100
committerNiklas Baumstark2012-04-10 23:54:38 +0200
commit6463714d0f477b35d3d8f533eafbe980ada0bf05 (patch)
treee75bd52873e34eaf60698f7fce252abadead27bd /fuzzyMode.js
parenta9d89d0aaa3e42904787666a6bcddb1521c32d7d (diff)
downloadvimium-6463714d0f477b35d3d8f533eafbe980ada0bf05.tar.bz2
fix small bug when closing and reopening dialog in combination with async updating
Diffstat (limited to 'fuzzyMode.js')
-rw-r--r--fuzzyMode.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/fuzzyMode.js b/fuzzyMode.js
index 7716acfa..9e3b09e0 100644
--- a/fuzzyMode.js
+++ b/fuzzyMode.js
@@ -48,8 +48,6 @@ var fuzzyMode = (function() {
this.prompt = '> ';
this.maxResults = maxResults;
this.refreshInterval = refreshInterval;
- // query used to filter the last completion result. We need this for asynchronous updating
- this.lastQuery = '';
this.initDom();
this.reset();
}
@@ -73,6 +71,8 @@ var fuzzyMode = (function() {
reset: function() {
this.query = '';
+ // query used to filter the last completion result. We need this for asynchronous updating
+ this.lastQuery = null;
this.completions = [];
this.selection = 0;
// force synchronous updating so that the old results will not be flash up shortly
@@ -182,7 +182,7 @@ var fuzzyMode = (function() {
// always update asynchronously for better user experience and to take some load off the CPU
// (not every keystroke will cause a dedicated update)
setTimeout(function() {
- if (self.query == self.lastQuery)
+ if (self.query === self.lastQuery)
return;
self.lastQuery = self.query;
self.updateCompletions();