diff options
| author | mrmr1993 | 2017-10-24 19:51:25 +0100 |
|---|---|---|
| committer | mrmr1993 | 2017-10-27 20:34:59 +0100 |
| commit | fe2255f4de5e17d6ab1a9168191bfbfaa488d62d (patch) | |
| tree | 257f29d9705befa93b599e5701a9315a3307f077 /content_scripts/mode_normal.coffee | |
| parent | ee95cb38bbd24fec444e0af3f593f470cce60d22 (diff) | |
| download | vimium-fe2255f4de5e17d6ab1a9168191bfbfaa488d62d.tar.bz2 | |
Move passNextKey to normal mode file
Diffstat (limited to 'content_scripts/mode_normal.coffee')
| -rw-r--r-- | content_scripts/mode_normal.coffee | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/content_scripts/mode_normal.coffee b/content_scripts/mode_normal.coffee index 6ae82fe6..9a53ce76 100644 --- a/content_scripts/mode_normal.coffee +++ b/content_scripts/mode_normal.coffee @@ -33,6 +33,13 @@ class NormalMode extends KeyHandlerMode else Utils.invokeCommandString registryEntry.command, count, {registryEntry} +enterNormalMode = (count) -> + new NormalMode + indicator: "Normal mode (pass keys disabled)" + exitOnEscape: true + singleton: "enterNormalMode" + count: count + NormalModeCommands = # Scrolling. scrollToBottom: -> @@ -112,6 +119,12 @@ NormalModeCommands = mainFrame: -> focusThisFrame highlight: true, forceFocusThisFrame: true showHelp: (sourceFrameId) -> HelpDialog.toggle {sourceFrameId, showAllCommandDetails: false} + passNextKey: (count, options) -> + if options.registryEntry.options.normal + enterNormalMode count + else + new PassNextKeyMode count + root = exports ? (window.root ?= {}) root.NormalMode = NormalMode root.NormalModeCommands = NormalModeCommands |
