+
+# To do:
+# - handle edit-mode losing the focus
+# - line-visual mode
+# - definition of a line.
+# - better implementation of `o`
+# - caret mode
+# - yy
 
 # This prevents printable characters from being passed through to underlying page.  It should, however, allow
 # through chrome keyboard shortcuts.  It's a backstop for all of the modes following.

                  @yank()
                  return @suppressEvent

                @scrollIntoView()
                break

        @continueBubbling

  handleMovementKeyChar: (keyChar) ->
    if @movements[keyChar]
      @protectClipboard =>
        @runCountPrefixTimes =>
          switch typeof @movements[keyChar]
            when "string" then @runMovement @movements[keyChar]
            when "function" then @movements[keyChar].call @

  yank: (args = {}) ->
    @yankedText = window.getSelection().toString()

    "$": "forward lineboundary"
    "0": "backward lineboundary"
    "G": "forward documentboundary"
    "g": "backward documentboundary"
    "Y": -> @selectLine()
    "o": -> @swapFocusAndAnchor()

