summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Pavlic <ted@tedpavlic.com>2008-12-19 10:49:56 -0500
committerTed Pavlic <ted@tedpavlic.com>2008-12-19 10:49:56 -0500
commit993ba60ee7f982ff2d69b10fbd86748c54b6b0ae (patch)
tree499df1d4eab38b259ea74b5384207343a18e89d6
parent86f14b77ccb127678c0743c3483175c15e901467 (diff)
downloadpentadactyl-993ba60ee7f982ff2d69b10fbd86748c54b6b0ae.tar.gz
Allow empty defsearch.
-rw-r--r--common/content/completion.js2
-rw-r--r--vimperator/content/bookmarks.js7
-rw-r--r--vimperator/locale/en-US/options.txt3
3 files changed, 11 insertions, 1 deletions
diff --git a/common/content/completion.js b/common/content/completion.js
index f9ddee03..f7594214 100644
--- a/common/content/completion.js
+++ b/common/content/completion.js
@@ -1645,7 +1645,7 @@ function Completion() //{{{
let engines = bookmarks.getSearchEngines();
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 };
if (!space || noSuggest)
diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js
index 8acac9f7..e887a580 100644
--- a/vimperator/content/bookmarks.js
+++ b/vimperator/content/bookmarks.js
@@ -589,6 +589,13 @@ function Bookmarks() //{{{
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
// format of returned array:
// [keyword, helptext, url]
diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt
index 2d017a69..22cdd8c7 100644
--- a/vimperator/locale/en-US/options.txt
+++ b/vimperator/locale/en-US/options.txt
@@ -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]. Therefore, you need to add a keyword or search engine
"youtube" first.
+
+If 'defsearch' is empty, then Firefox will always attempt to open the
+raw [[arg]].
____