diff options
| -rw-r--r-- | lib/completion.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/completion.js b/lib/completion.js index bc9b6fc6..240468cb 100644 --- a/lib/completion.js +++ b/lib/completion.js @@ -165,12 +165,16 @@ var completion = (function() { }); /** A fuzzy tab completer */ - var FuzzyTabCompletionSource = AsyncCompletionSource.extend({ + var FuzzyTabCompletionSource = Class.extend({ + init: function() { this.asyncCompleter = new AsyncCompletionSource(); }, + + filter: function(query, callback) { return this.asyncCompleter.filter(query, callback); }, + refresh: function() { - this.reset(); + this.asyncCompleter.reset(); chrome.tabs.getAllInWindow(null, function(tabs) { - this.resultsReady(tabs.map(function(tab) { - return this.createInternalMatch("tab", tab, + this.asyncCompleter.resultsReady(tabs.map(function(tab) { + return this.asyncCompleter.createInternalMatch("tab", tab, { func: "completion.createActionSwitchToTab", args: [tab.id] }); }.proxy(this))); }.proxy(this)); |
