mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-14 06:45:51 +01:00
Make 'cpt' a stringlist. Add support for native autocomplete providers.
This commit is contained in:
@@ -706,9 +706,9 @@ var Bookmarks = Module("bookmarks", {
|
||||
});
|
||||
};
|
||||
|
||||
completion.addUrlCompleter("S", "Suggest engines", completion.searchEngineSuggest);
|
||||
completion.addUrlCompleter("b", "Bookmarks", completion.bookmark);
|
||||
completion.addUrlCompleter("s", "Search engines and keyword URLs", completion.search);
|
||||
completion.addUrlCompleter("suggestion", "Suggest engines", completion.searchEngineSuggest);
|
||||
completion.addUrlCompleter("bookmark", "Bookmarks", completion.bookmark);
|
||||
completion.addUrlCompleter("search", "Search engines and keyword URLs", completion.search);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1955,7 +1955,7 @@ var Buffer = Module("buffer", {
|
||||
dactyl.assert(url, _("error.clipboardEmpty"));
|
||||
|
||||
let proto = /^([-\w]+):/.exec(url);
|
||||
if (proto && "@mozilla.org/network/protocol;1?name=" + proto[1] in Cc && !RegExp(options["urlseparator"]).test(url))
|
||||
if (proto && services.PROTOCOL + proto[1] in Cc && !RegExp(options["urlseparator"]).test(url))
|
||||
return url.replace(/\s+/g, "");
|
||||
return url;
|
||||
}
|
||||
|
||||
@@ -1108,7 +1108,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
|
||||
// If it starts with a valid protocol, pass it through.
|
||||
let proto = /^([-\w]+):/.exec(url);
|
||||
if (proto && "@mozilla.org/network/protocol;1?name=" + proto[1] in Cc)
|
||||
if (proto && services.PROTOCOL + proto[1] in Cc)
|
||||
return url;
|
||||
|
||||
// Check for a matching search keyword.
|
||||
|
||||
@@ -312,7 +312,7 @@ var History = Module("history", {
|
||||
context.generate = function () history.get(context.filter, this.maxItems, sort);
|
||||
};
|
||||
|
||||
completion.addUrlCompleter("h", "History", completion.history);
|
||||
completion.addUrlCompleter("history", "History", completion.history);
|
||||
},
|
||||
mappings: function () {
|
||||
function bind() mappings.add.apply(mappings, [config.browserModes].concat(Array.slice(arguments)));
|
||||
|
||||
@@ -279,9 +279,9 @@ var KeyProcessor = Class("KeyProcessor", {
|
||||
return KeyArgProcessor(this, map, true, "motion");
|
||||
|
||||
return this.execute(map, {
|
||||
keyEvents: this.keyEvents,
|
||||
command: this.command,
|
||||
count: this.count,
|
||||
keyEvents: events.keyEvents,
|
||||
keypressEvents: this.events
|
||||
});
|
||||
}
|
||||
@@ -313,7 +313,8 @@ var KeyArgProcessor = Class("KeyArgProcessor", KeyProcessor, {
|
||||
let args = {
|
||||
command: this.parent.command,
|
||||
count: this.count || this.parent.count,
|
||||
events: this.parent.events.concat(this.events)
|
||||
keyEvents: events.keyEvents,
|
||||
keypressEvents: this.parent.events.concat(this.events)
|
||||
};
|
||||
args[this.argName] = this.command;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user