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

Set modes.isReplaying any time we're feeding keys--unbreak :map (maybe this isn't the best way).

This commit is contained in:
Kris Maglione
2008-09-15 05:44:34 +00:00
parent 21e2bee6fd
commit 7caca73e18

View File

@@ -734,8 +734,6 @@ liberator.Events = function () //{{{
if (macros.get(lastMacro))
{
liberator.modes.isReplaying = true;
// make sure the page is stopped before starting to play the macro
try
{
@@ -745,7 +743,6 @@ liberator.Events = function () //{{{
liberator.buffer.loaded = 1; // even if not a full page load, assume it did load correctly before starting the macro
res = liberator.events.feedkeys(macros.get(lastMacro), true); // true -> noremap
liberator.modes.isReplaying = false;
}
else
{
@@ -797,6 +794,8 @@ liberator.Events = function () //{{{
var charCode = keys.charCodeAt(i);
var keyCode = 0;
var shift = false, ctrl = false, alt = false, meta = false;
liberator.modes.isReplaying = true;
//if (charCode == 92) // the '\' key FIXME: support the escape key
if (charCode == 60 && !escapeKey) // the '<' key starts a complex key
{
@@ -826,7 +825,7 @@ liberator.Events = function () //{{{
}
else // an invalid key like <A-xxx> was found, stop propagation here (like Vim)
{
return false;
break;
}
i += matches[0].length + 1;
@@ -848,13 +847,14 @@ liberator.Events = function () //{{{
elem.dispatchEvent(evt);
// stop feeding keys if page loading failed
if (!liberator.modes.isReplaying)
return false;
break;
if (!waitForPageLoaded())
return false;
break;
// else // a short break between keys often helps
// liberator.sleep(50);
}
return true;
liberator.modes.isReplaying = false;
return i == keys.length;
},
// this function converts the given event to