diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-07-01 11:19:10 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-07-01 11:19:10 -0400 |
commit | 130721879dedf76f196902f3bc41d0d654a6c652 (patch) | |
tree | 8f13113b8ebff8bcaf10ae96cd7699c017bbcd33 /common | |
parent | 20cc063b687d1db1f978c0a45607863b3a33f096 (diff) | |
download | pentadactyl-130721879dedf76f196902f3bc41d0d654a6c652.tar.gz |
Cleanup Pass Through bit rot.
--HG--
extra : rebase_source : 66ce280799e5bffd9e9b0729b772c3b6639eeb86
Diffstat (limited to 'common')
-rw-r--r-- | common/content/events.js | 13 |
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) |