mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 19:52:27 +01:00
Fix some bugs.
--HG-- branch : groups
This commit is contained in:
@@ -156,7 +156,10 @@ var Command = Class("Command", {
|
||||
throw FailedAssertion("E477: No ! allowed");
|
||||
|
||||
return !dactyl.trapErrors(function exec() {
|
||||
update({}, this.hive.argsExtra(args), args);
|
||||
let extra = this.hive.argsExtra(args);
|
||||
for (let k in properties(extra))
|
||||
if (!(k in args))
|
||||
Object.defineProperty(args, k, Object.getOwnPropertyDescriptor(extra, k));
|
||||
|
||||
if (this.always)
|
||||
this.always(args, modifiers);
|
||||
@@ -1339,7 +1342,7 @@ var Commands = Module("commands", {
|
||||
args["-description"],
|
||||
contexts.bindMacro(args, "-ex",
|
||||
function makeParams(args, modifiers) ({
|
||||
args: {
|
||||
args: {
|
||||
__proto__: args,
|
||||
toString: function () this.string,
|
||||
},
|
||||
|
||||
@@ -1358,7 +1358,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
*/
|
||||
reportError: function reportError(error, echo) {
|
||||
if (error instanceof FailedAssertion || error.message === "Interrupted") {
|
||||
|
||||
let context = contexts.context;
|
||||
let prefix = context ? context.file + ":" + context.line + ": " : "";
|
||||
if (error.message && error.message.indexOf(prefix) !== 0)
|
||||
|
||||
@@ -55,8 +55,10 @@ var ProcessorStack = Class("ProcessorStack", {
|
||||
events.feedingKeys = false;
|
||||
}
|
||||
|
||||
for (var res = this.actions[0]; callable(res);)
|
||||
res = res();
|
||||
for (var res = this.actions[0]; callable(res);) {
|
||||
res = dactyl.trapErrors(res);
|
||||
events.dbg("ACTION RES: " + res);
|
||||
}
|
||||
result = res === Events.PASS ? Events.PASS : Events.KILL;
|
||||
}
|
||||
else if (result !== Events.KILL && !this.actions.length &&
|
||||
@@ -402,7 +404,7 @@ var Events = Module("events", {
|
||||
}
|
||||
|
||||
this._activeMenubar = false;
|
||||
this.listen(window, this, "events");
|
||||
this.listen(window, this, "events", true);
|
||||
|
||||
dactyl.registerObserver("modeChange", function () {
|
||||
delete self.processor;
|
||||
|
||||
@@ -423,7 +423,7 @@ var Modes = Module("modes", {
|
||||
|
||||
hidden: false,
|
||||
|
||||
input: false,
|
||||
input: Class.memoize(function () this.bases.length && this.bases.some(function (b) b.input)),
|
||||
|
||||
get passUnknown() this.input,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user