       when "Caret"
         # Try to start with a visible selection.
         @moveInDirection(forward) or @moveInDirection backward unless options.underEditMode
+        @scrollIntoView() if @selection.type == "Range"
 
     defaults =
       name: "visual"

    @commands = {}
    @alterMethod = options.alterMethod || "extend"
    @keyQueue = ""
    @yankedText = ""
    super options


    super extend defaults, options

    extend @commands,
      "V": -> new VisualLineMode extend @options, initialRange: @selection.getRangeAt(0).cloneRange()
      "y": ->
        # Special case: "yy" (the first from edit mode, and now the second).
        @selectLine() if @options.yYanksLine and @keyPressCount == 1
        @yank()

    if @options.underEditMode
      extend @commands,
        "c": -> @yank(); enterInsertMode()
        "d": ->
          # Special case: "dd" (the first from edit mode, and now the second).
          @selectLine() if @options.dYanksLine and @keyPressCount == 1
          @yank deleteFromDocument: true

    unless @options.underEditMode
      @installFindMode()

    # Grab the initial clipboard contents.  We'll try to keep them intact until we get an explicit yank.
    @clipboardContents = ""
    @paste (text) =>
      @clipboardContents = text if text
    #
    # End of VisualMode constructor.

  protectClipboard: (func) ->
    func()
    @copy @clipboardContents if @clipboardContents

  copy: (text) ->
    super @clipboardContents = text
