aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-01-14 07:57:09 +0000
committerStephen Blott2015-01-14 09:46:00 +0000
commit9b0a48955c61c262cc4428b2360938d4b54d2d41 (patch)
tree3abda5d154e96ad019eb9aa67ff59a362775fa23 /content_scripts/mode.coffee
parent7e1c3475ed9241a5e1fbf78b8134e6ed669ea906 (diff)
downloadvimium-9b0a48955c61c262cc4428b2360938d4b54d2d41.tar.bz2
Modes; substantial reworking of insert mode (and friends).
Diffstat (limited to 'content_scripts/mode.coffee')
-rw-r--r--content_scripts/mode.coffee21
1 files changed, 0 insertions, 21 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee
index 98d3df80..ebb3e8bc 100644
--- a/content_scripts/mode.coffee
+++ b/content_scripts/mode.coffee
@@ -119,30 +119,9 @@ class Mode
@passKeys = passKeys
@registerStateChange?()
- # If @options.suppressPrintableEvents is truthy, then it should be an element. All printable keyboard
- # events on that element are suppressed, if necessary. They are suppressed *after* bubbling down the
- # handler stack and finding no handler. This is used by PostFindMode to protect active, editable
- # elements. Note, this handler is installed with unshift (not push), so it ends is installed at the
- # *bottom* of the handler stack, and sees keyboard events only after other modes (notably, normal mode)
- # have not handled them.
- if @options.suppressPrintableEvents
- do =>
- handler = (event) =>
- if event.srcElement == @options.suppressPrintableEvents and KeyboardUtils.isPrintable event
- @suppressEvent
- else
- @continueBubbling
-
- @unshift
- _name: "mode-#{@id}/suppressPrintableEvents"
- keydown: handler
- keypress: handler
- keyup: handler
-
Mode.updateBadge() if @badge
Mode.modes.push @
@logStack() if @debug
- # handlerStack.debugOn()
# End of Mode constructor.
push: (handlers) ->