summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/content/bookmarks.js2
-rw-r--r--common/content/marks.js5
-rw-r--r--common/modules/completion.jsm4
-rw-r--r--common/modules/storage.jsm3
-rw-r--r--pentadactyl/content/config.js5
5 files changed, 12 insertions, 7 deletions
diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js
index b0443396..cb411ba9 100644
--- a/common/content/bookmarks.js
+++ b/common/content/bookmarks.js
@@ -661,7 +661,7 @@ var Bookmarks = Module("bookmarks", {
ctxt.compare = CompletionContext.Sort.unsorted;
ctxt.filterFunc = null;
- let words = ctxt.filter.split(/\s+/g);
+ let words = ctxt.filter.toLowerCase().split(/\s+/g);
ctxt.completions = ctxt.completions.filter(function (i) words.every(function (w) i.toLowerCase().indexOf(w) >= 0));
ctxt.hasItems = ctxt.completions.length;
diff --git a/common/content/marks.js b/common/content/marks.js
index 73a9805d..c6c88179 100644
--- a/common/content/marks.js
+++ b/common/content/marks.js
@@ -12,9 +12,8 @@
*/
var Marks = Module("marks", {
init: function init() {
- function replacer(key, val) val instanceof Ci.nsISupports ? null : val;
- this._localMarks = storage.newMap("local-marks", { privateData: true, replacer: replacer, store: true });
- this._urlMarks = storage.newMap("url-marks", { privateData: true, replacer: replacer, store: true });
+ this._localMarks = storage.newMap("local-marks", { privateData: true, replacer: Storage.Replacer.skipXpcom, store: true });
+ this._urlMarks = storage.newMap("url-marks", { privateData: true, replacer: Storage.Replacer.skipXpcom, store: true });
try {
if (isArray(Iterator(this._localMarks).next()[1]))
diff --git a/common/modules/completion.jsm b/common/modules/completion.jsm
index 428cf92b..abcebb30 100644
--- a/common/modules/completion.jsm
+++ b/common/modules/completion.jsm
@@ -846,6 +846,8 @@ var Completion = Module("completion", {
get setFunctionCompleter() JavaScript.setCompleter, // Backward compatibility
Local: function (dactyl, modules, window) ({
+ urlCompleters: {},
+
get options() modules.options,
// FIXME
@@ -923,8 +925,6 @@ var Completion = Module("completion", {
}, this);
},
- urlCompleters: {},
-
addUrlCompleter: function addUrlCompleter(opt) {
let completer = Completion.UrlCompleter.apply(null, Array.slice(arguments));
completer.args = Array.slice(arguments, completer.length);
diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm
index eb4ff604..f3b1c086 100644
--- a/common/modules/storage.jsm
+++ b/common/modules/storage.jsm
@@ -264,6 +264,9 @@ var Storage = Module("Storage", {
return this._privateMode = Boolean(val);
}
}, {
+ Replacer: {
+ skipXpcom: function skipXpcom(key, val) val instanceof Ci.nsISupports ? null : val
+ }
}, {
init: function init(dactyl, modules) {
init.superapply(this, arguments);
diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js
index 44f1d766..3e4c258b 100644
--- a/pentadactyl/content/config.js
+++ b/pentadactyl/content/config.js
@@ -294,7 +294,10 @@ var Config = Module("config", ConfigBase, {
context.anchored = false;
context.compare = CompletionContext.Sort.unsorted;
context.filterFunc = null;
- context.hasItems = context.completions.length > 0; // XXX
+
+ let words = context.filter.toLowerCase().split(/\s+/g);
+ context.completions = context.completions.filter(function ({ url, title })
+ words.every(function (w) (url + " " + title).toLowerCase().indexOf(w) >= 0))
context.incomplete = true;
context.format = modules.bookmarks.format;