1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 20:32:25 +01:00

Allow empty defsearch.

This commit is contained in:
Ted Pavlic
2008-12-19 10:49:56 -05:00
parent 86f14b77cc
commit 993ba60ee7
3 changed files with 11 additions and 1 deletions

View File

@@ -1645,7 +1645,7 @@ function Completion() //{{{
let engines = bookmarks.getSearchEngines(); let engines = bookmarks.getSearchEngines();
context.title = ["Search Keywords"]; context.title = ["Search Keywords"];
context.completions = keywords.concat(engines); context.completions = [ bookmarks.makeKeyword("", "No default search engine", null, "") ].concat( keywords.concat(engines) );
context.keys = { text: 0, description: 1, icon: 2 }; context.keys = { text: 0, description: 1, icon: 2 };
if (!space || noSuggest) if (!space || noSuggest)

View File

@@ -589,6 +589,13 @@ function Bookmarks() //{{{
return process(resp); return process(resp);
}, },
// Allows for creation of anonymous keyword (e.g., for empty
// defsearch's)
makeKeyword: function makeKeyword(keyword, title, icon, url)
{
return new Keyword( keyword, title, icon, url );
},
// TODO: add filtering // TODO: add filtering
// format of returned array: // format of returned array:
// [keyword, helptext, url] // [keyword, helptext, url]

View File

@@ -247,6 +247,9 @@ This means, it you set 'defsearch' to "youtube", then [c]:open arnold
schwarzenegger[c] will be exactly the same as [c]:open youtube arnold schwarzenegger[c] will be exactly the same as [c]:open youtube arnold
schwarzenegger[c]. Therefore, you need to add a keyword or search engine schwarzenegger[c]. Therefore, you need to add a keyword or search engine
"youtube" first. "youtube" first.
If 'defsearch' is empty, then Firefox will always attempt to open the
raw [[arg]].
____ ____