summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-07-01 11:19:10 -0400
committerKris Maglione <maglione.k@gmail.com>2011-07-01 11:19:10 -0400
commit130721879dedf76f196902f3bc41d0d654a6c652 (patch)
tree8f13113b8ebff8bcaf10ae96cd7699c017bbcd33
parent20cc063b687d1db1f978c0a45607863b3a33f096 (diff)
downloadpentadactyl-130721879dedf76f196902f3bc41d0d654a6c652.tar.gz
Cleanup Pass Through bit rot.
--HG-- extra : rebase_source : 66ce280799e5bffd9e9b0729b772c3b6639eeb86
-rw-r--r--common/content/events.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/common/content/events.js b/common/content/events.js
index 095d0b8f..2da11d9d 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -1333,20 +1333,19 @@ var Events = Module("events", {
let ignore = false;
- if (modes.main == modes.PASS_THROUGH)
+ if (mode.main == modes.PASS_THROUGH)
ignore = !Events.isEscape(key) && key != "<C-v>";
- else if (modes.main == modes.QUOTE) {
+ else if (mode.main == modes.QUOTE) {
if (modes.getStack(1).main == modes.PASS_THROUGH) {
- mode.params.mainMode = modes.getStack(2).main;
+ mode = Modes.StackElement(modes.getStack(2).main);
ignore = Events.isEscape(key);
}
else if (events.shouldPass(event))
- mode.params.mainMode = modes.getStack(1).main;
+ mode = Modes.StackElement(modes.getStack(1).main);
else
ignore = true;
- if (ignore)
- modes.pop();
+ modes.pop();
}
else if (!event.isMacro && !event.noremap && events.shouldPass(event))
ignore = true;
@@ -1652,7 +1651,7 @@ var Events = Module("events", {
["<C-z>", "<pass-all-keys>"], "Temporarily ignore all " + config.appName + " key bindings",
function () { modes.push(modes.PASS_THROUGH); });
- mappings.add([modes.MAIN],
+ mappings.add([modes.MAIN, modes.PASS_THROUGH, modes.QUOTE],
["<C-v>", "<pass-next-key>"], "Pass through next key",
function () {
if (modes.main == modes.QUOTE)