1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-05 06:24:12 +01: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

View File

@@ -451,15 +451,13 @@ 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);
modes.replaying = true;
res = events.feedkeys(this._macros.get(this._lastMacro).keys, { noremap: true });
}
finally {
modes.replaying = false;
}
catch (e) {}
modes.replaying = true;
res = events.feedkeys(this._macros.get(this._lastMacro).keys, { noremap: true });
modes.replaying = false;
}
else
// TODO: ignore this like Vim?
@@ -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;
},
/**