diff options
| author | Phil Crosby | 2012-05-05 00:09:14 -0700 | 
|---|---|---|
| committer | Phil Crosby | 2012-05-05 18:32:13 -0700 | 
| commit | 3a0f19dc531c2a5fafc02f1e4f97cab5517c93bf (patch) | |
| tree | 873668084679b5f991f78e759dfbc303b4735a94 /lib/completion.js | |
| parent | 9f3cfbe69d591d5aea9fc3aef34fc7f1d25eddbf (diff) | |
| download | vimium-3a0f19dc531c2a5fafc02f1e4f97cab5517c93bf.tar.bz2 | |
less inheritence
Diffstat (limited to 'lib/completion.js')
| -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)); | 
