1
0
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:
Kris Maglione
2011-04-08 04:48:34 -04:00
parent d622b4decc
commit e88490ef7d
3 changed files with 8 additions and 15 deletions

View File

@@ -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");
});

View File

@@ -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

View File

@@ -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)
});
}
});