mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-08 05:04:12 +01:00
Fix bookmark tag completion.
This commit is contained in:
@@ -339,14 +339,8 @@ var Bookmarks = Module("bookmarks", {
|
||||
getSearchURL: function getSearchURL(text, useDefsearch) {
|
||||
let query = (useDefsearch ? options["defsearch"] + " " : "") + text;
|
||||
|
||||
// ripped from Firefox
|
||||
var keyword = query;
|
||||
var param = "";
|
||||
var offset = query.indexOf(" ");
|
||||
if (offset > 0) {
|
||||
keyword = query.substr(0, offset);
|
||||
param = query.substr(offset + 1);
|
||||
}
|
||||
let [keyword, param] = util.split(query, " ", 2);
|
||||
param = param || "";
|
||||
|
||||
var engine = hasOwnProperty(bookmarks.searchEngines, keyword) && bookmarks.searchEngines[keyword];
|
||||
if (engine) {
|
||||
@@ -438,7 +432,7 @@ var Bookmarks = Module("bookmarks", {
|
||||
description: "A comma-separated list of tags",
|
||||
completer: function tags(context, args) {
|
||||
context.generate = function () Ary(b.tags
|
||||
for (b in bookmarkcache)
|
||||
for (b of bookmarkcache)
|
||||
if (b.tags))
|
||||
.flatten().uniq().array;
|
||||
context.keys = { text: util.identity, description: util.identity };
|
||||
|
||||
Reference in New Issue
Block a user