1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 20:27:58 +01:00

Normalise the standard completer signatures to fn(context, args, ...).

This also fixes a number of the :command completers.

--HG--
extra : rebase_source : 588a9b5a163ba3882c89d0716f292ef9658297f6
This commit is contained in:
Doug Kearns
2010-11-06 23:52:23 +11:00
parent e927c521d9
commit 7787f0a2ce
8 changed files with 33 additions and 34 deletions

View File

@@ -765,7 +765,7 @@ const Completion = Module("completion", {
// may consist of search engines, filenames, bookmarks and history,
// depending on the 'complete' option
// if the 'complete' argument is passed like "h", it temporarily overrides the complete option
url: function url(context, complete) {
url: function url(context, args, complete) {
let numLocationCompletions = 0; // how many async completions did we already return to the caller?
let start = 0;
let skip = 0;
@@ -794,7 +794,7 @@ const Completion = Module("completion", {
this.urlCompleters[opt] = completer;
},
urls: function (context, tags) {
urls: function (context, args, tags) {
let compare = String.localeCompare;
let contains = String.indexOf;
if (context.ignoreCase) {