1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:47:59 +01:00

Fix :normal. Closes issue #275.

This commit is contained in:
Kris Maglione
2011-01-19 20:43:49 -05:00
parent 95eb8aaf93
commit 35d7d40c43
3 changed files with 7 additions and 4 deletions

View File

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

View File

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

View File

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