diff --git a/common/content/commandline.js b/common/content/commandline.js index a9360735..45de671b 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -666,6 +666,8 @@ var CommandLine = Module("commandline", { return this.widgets.command = val; return this._lastCommand = val; }, + get lastCommand() this._lastCommand || this.command, + set lastCommand(val) { this._lastCommand = val }, clear: function () { if (this.widgets.message && this.widgets.message[1] === this._lastClearable) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index a59ec5c2..128f6452 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -424,7 +424,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { modifiers = modifiers || {}; if (!silent) - commandline.command = str.replace(/^\s*:\s*/, ""); + commandline.lastCommand = str.replace(/^\s*:\s*/, ""); let res = true; for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) { if (command === null) diff --git a/common/content/events.js b/common/content/events.js index dab81df1..2568f8b9 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -290,6 +290,7 @@ var Events = Module("events", { evt.noremap = !!noremap; evt.isMacro = true; evt.dactylMode = mode; + this.feedingEvent = evt; let event = events.create(document.commandDispatcher.focusedWindow.document, type, evt); if (!evt_obj.dactylString && !evt_obj.dactylShift && !mode) @@ -318,8 +319,8 @@ var Events = Module("events", { if (this.duringFeed.length) { let duringFeed = this.duringFeed; this.duringFeed = []; - for (let [, evt] in Iterator(duringFeed)) - events.dispatch(evt.originalTarget, evt); + for (let [, event] in Iterator(duringFeed)) + events.dispatch(event.originalTarget, event, event); } } }, @@ -1009,7 +1010,7 @@ var Events = Module("events", { for (let [i, event] in Iterator(refeed)) if (event.originalTarget) { let evt = events.create(event.originalTarget.ownerDocument, event.type, event); - events.dispatch(event.originalTarget, evt, { skipmap: true }); + events.dispatch(event.originalTarget, evt, { skipmap: true, isMacro: true }); } else if (i > 0) events.onKeyPress(event);