mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 14:22:27 +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:
@@ -734,8 +734,6 @@ liberator.Events = function () //{{{
|
|||||||
|
|
||||||
if (macros.get(lastMacro))
|
if (macros.get(lastMacro))
|
||||||
{
|
{
|
||||||
liberator.modes.isReplaying = true;
|
|
||||||
|
|
||||||
// make sure the page is stopped before starting to play the macro
|
// make sure the page is stopped before starting to play the macro
|
||||||
try
|
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
|
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
|
res = liberator.events.feedkeys(macros.get(lastMacro), true); // true -> noremap
|
||||||
liberator.modes.isReplaying = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -797,6 +794,8 @@ liberator.Events = function () //{{{
|
|||||||
var charCode = keys.charCodeAt(i);
|
var charCode = keys.charCodeAt(i);
|
||||||
var keyCode = 0;
|
var keyCode = 0;
|
||||||
var shift = false, ctrl = false, alt = false, meta = false;
|
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 == 92) // the '\' key FIXME: support the escape key
|
||||||
if (charCode == 60 && !escapeKey) // the '<' key starts a complex 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)
|
else // an invalid key like <A-xxx> was found, stop propagation here (like Vim)
|
||||||
{
|
{
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
i += matches[0].length + 1;
|
i += matches[0].length + 1;
|
||||||
@@ -848,13 +847,14 @@ liberator.Events = function () //{{{
|
|||||||
elem.dispatchEvent(evt);
|
elem.dispatchEvent(evt);
|
||||||
// stop feeding keys if page loading failed
|
// stop feeding keys if page loading failed
|
||||||
if (!liberator.modes.isReplaying)
|
if (!liberator.modes.isReplaying)
|
||||||
return false;
|
break;
|
||||||
if (!waitForPageLoaded())
|
if (!waitForPageLoaded())
|
||||||
return false;
|
break;
|
||||||
// else // a short break between keys often helps
|
// else // a short break between keys often helps
|
||||||
// liberator.sleep(50);
|
// liberator.sleep(50);
|
||||||
}
|
}
|
||||||
return true;
|
liberator.modes.isReplaying = false;
|
||||||
|
return i == keys.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
// this function converts the given event to
|
// this function converts the given event to
|
||||||
|
|||||||
Reference in New Issue
Block a user