1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 17:45:45 +01:00

Add filtering to :addons and :downloads. Add -type flag to :addons.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-24 05:05:57 -05:00
parent 93b9aade1d
commit e0e2e805f7
7 changed files with 71 additions and 15 deletions

View File

@@ -481,6 +481,13 @@ var CompletionContext = Class("CompletionContext", {
let filtered = this.filterFunc(this._cache.constructed);
if (this.maxItems)
filtered = filtered.slice(0, this.maxItems);
if (/types/.test(this.name)) {
let self = this;
util.dump(this.filters[1]);
util.dump("FILTERED", this._cache.constructed.map(function (item) [item.text.quote(), self.filters[0].call(self, item.text)]));
util.dump("FILTERED", this._cache.constructed.map(function (item)
self.filters.map(function (filter) filter.call(self, item))));
}
// Sorting
if (this.sortResults && this.compare)