mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 11:58:00 +01:00
Fix some missed function renames
This commit is contained in:
@@ -588,7 +588,7 @@ function Completion() //{{{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.get("wildoptions").has("sort"))
|
if (options.get("wildoptions").has("sort"))
|
||||||
filtered = filtered.sort(function (a, b) util.ciCompare(a[0], b[0]));;
|
filtered = filtered.sort(function (a, b) util.compareIgnoreCase(a[0], b[0]));;
|
||||||
return filtered;
|
return filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,7 +629,7 @@ function Completion() //{{{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.get("wildoptions").has("sort"))
|
if (options.get("wildoptions").has("sort"))
|
||||||
filtered = filtered.sort(function (a, b) util.ciCompare(a[0], b[0]));;
|
filtered = filtered.sort(function (a, b) util.compareIgnoreCase(a[0], b[0]));;
|
||||||
return filtered;
|
return filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,7 +639,11 @@ function Completion() //{{{
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
setFunctionCompleter: function (func, completers)
|
setFunctionCompleter: function (funcs, completers)
|
||||||
|
{
|
||||||
|
if (!(funcs instanceof Array))
|
||||||
|
funcs = [funcs];
|
||||||
|
for (let [,func] in Iterator(funcs))
|
||||||
{
|
{
|
||||||
func.liberatorCompleter = function (func, obj, string, args) {
|
func.liberatorCompleter = function (func, obj, string, args) {
|
||||||
let completer = completers[args.length - 1];
|
let completer = completers[args.length - 1];
|
||||||
@@ -647,6 +651,7 @@ function Completion() //{{{
|
|||||||
return [];
|
return [];
|
||||||
return completer.call(this, this.eval(obj), this.eval(args.pop()) + string, args);
|
return completer.call(this, this.eval(obj), this.eval(args.pop()) + string, args);
|
||||||
};
|
};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// returns the longest common substring
|
// returns the longest common substring
|
||||||
|
|||||||
@@ -847,14 +847,11 @@ function Options() //{{{
|
|||||||
liberator.registerObserver("load_completion", function ()
|
liberator.registerObserver("load_completion", function ()
|
||||||
{
|
{
|
||||||
completion.setFunctionCompleter(options.get, [function () ([o.name, o.description] for (o in options))]);
|
completion.setFunctionCompleter(options.get, [function () ([o.name, o.description] for (o in options))]);
|
||||||
let listPrefs = [function () Components.classes["@mozilla.org/preferences-service;1"]
|
completion.setFunctionCompleter([options.getPref, options.setPref, options.resetPref, options.invertPref],
|
||||||
|
[function () Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Components.interfaces.nsIPrefBranch)
|
.getService(Components.interfaces.nsIPrefBranch)
|
||||||
.getChildList("", { value: 0 })
|
.getChildList("", { value: 0 })
|
||||||
.map(function (pref) [pref, ""])];
|
.map(function (pref) [pref, ""])]);
|
||||||
completion.setFunctionCompleter(options.getPref, listPrefs);
|
|
||||||
completion.setFunctionCompleter(options.setPref, listPrefs);
|
|
||||||
completion.setFunctionCompleter(options.resetPref, listPrefs);
|
|
||||||
completion.setFunctionCompleter(options.invertPref, listPrefs);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user