1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-19 05:35:46 +01:00

Precompute completion string matching function.

This commit is contained in:
Kris Maglione
2010-09-17 06:15:13 -04:00
parent 8b0d9586b2
commit a5213c3760
14 changed files with 68 additions and 63 deletions

View File

@@ -366,6 +366,7 @@ const Bookmarks = Module("bookmarks", {
type: CommandOption.INT
}
]
// Not privateData, since we don't treat bookmarks as private
});
commands.add(["delbm[arks]"],
@@ -457,7 +458,7 @@ const Bookmarks = Module("bookmarks", {
for (let val in Iterator(extra || [])) {
let [k, v] = val; // Need block scope here for the closure
if (v)
context.filters.push(function (item) this._match(v, item[k]));
context.filters.push(function (item) this.matchString(v, item[k]));
}
context.completions = bookmarkcache.bookmarks;
completion.urls(context, tags);