mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-19 17:25:46 +01:00
Fix macro playback with counts. Closes issue #294.
--HG-- branch : key-processing
This commit is contained in:
@@ -451,15 +451,13 @@ var Events = Module("events", {
|
|||||||
this._lastMacro = macro.toLowerCase(); // XXX: sets last played macro, even if it does not yet exist
|
this._lastMacro = macro.toLowerCase(); // XXX: sets last played macro, even if it does not yet exist
|
||||||
|
|
||||||
if (this._macros.get(this._lastMacro)) {
|
if (this._macros.get(this._lastMacro)) {
|
||||||
// make sure the page is stopped before starting to play the macro
|
|
||||||
try {
|
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
|
else
|
||||||
// TODO: ignore this like Vim?
|
// TODO: ignore this like Vim?
|
||||||
@@ -537,7 +535,7 @@ var Events = Module("events", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.feedingKeys)
|
if (!this.feedingKeys)
|
||||||
break;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
@@ -549,6 +547,7 @@ var Events = Module("events", {
|
|||||||
if (quiet)
|
if (quiet)
|
||||||
commandline.quiet = wasQuiet;
|
commandline.quiet = wasQuiet;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user