mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 21:28:00 +01:00
Fix idiocy. Closes issue #496.
This commit is contained in:
@@ -1411,20 +1411,13 @@ var Commands = Module("commands", {
|
||||
if (/^custom,/.test(completer)) {
|
||||
completer = completer.substr(7);
|
||||
|
||||
let context = update({}, contexts.context || {});
|
||||
if (contexts.context)
|
||||
var ctxt = update({}, contexts.context || {});
|
||||
completerFunc = function (context) {
|
||||
try {
|
||||
var result = contextswithSavedValues(["context"], function () {
|
||||
contexts.context = context;
|
||||
return dactyl.userEval(completer);
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
dactyl.echo(":" + this.name + " ..."); // XXX
|
||||
dactyl.echoerr(_("command.unknownCompleter", completer));
|
||||
dactyl.log(e);
|
||||
return undefined;
|
||||
}
|
||||
var result = contexts.withSavedValues(["context"], function () {
|
||||
contexts.context = ctxt;
|
||||
return dactyl.userEval(completer);
|
||||
});
|
||||
if (callable(result))
|
||||
return result.apply(this, Array.slice(arguments));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user