1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-21 01:31:25 +02:00

Fix macro playback with counts. Closes issue #294.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-26 16:28:28 -05:00
parent 1d3732d746
commit bbadc27667
+5 -6
View File
@@ -451,16 +451,14 @@ var Events = Module("events", {
this._lastMacro = macro.toLowerCase(); // XXX: sets last played macro, even if it does not yet exist
if (this._macros.get(this._lastMacro)) {
// make sure the page is stopped before starting to play the macro
try {
window.getWebNavigation().stop(nsIWebNavigation.STOP_ALL);
}
catch (e) {}
modes.replaying = true;
res = events.feedkeys(this._macros.get(this._lastMacro).keys, { noremap: true });
}
finally {
modes.replaying = false;
}
}
else
// TODO: ignore this like Vim?
dactyl.echoerr("Exxx: Register '" + this._lastMacro + "' not set");
@@ -537,7 +535,7 @@ var Events = Module("events", {
}
if (!this.feedingKeys)
break;
return false;
}
}
catch (e) {
@@ -549,6 +547,7 @@ var Events = Module("events", {
if (quiet)
commandline.quiet = wasQuiet;
}
return true;
},
/**