mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 03:57:59 +01:00
Fix idiocy. Closes issue #496.
This commit is contained in:
@@ -311,7 +311,7 @@ var MOW = Module("mow", {
|
||||
mappings.add([modes.COMMAND],
|
||||
["g<lt>"], "Redisplay the last command output",
|
||||
function () {
|
||||
dactyl.assert(commandline.lastOutput, _("mow.noPreviousOutput"));
|
||||
dactyl.assert(mow.lastOutput, _("mow.noPreviousOutput"));
|
||||
mow.echo(mow.lastOutput, "Normal");
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -669,7 +669,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
},
|
||||
initialValue: true,
|
||||
persist: false,
|
||||
validator: function (val) parseInt(val) == val || modules.Option.validateCompleter.call(this, val)
|
||||
validator: function validator(val) parseInt(val) == val || validator.superapply(this, arguments)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user