         selectionRect = Rect.intersect selectionRect, Rect.create 0, 0, window.innerWidth, window.innerHeight
         if selectionRect.height >= 0 and selectionRect.width >= 0
           # The selection is visible in the current viewport.
-          if @selection.type == "Caret"
+          if @selection.toString().length == 0
             # The caret is in the viewport. Make make it visible.
             @movement.extendByOneCharacter(forward) or @movement.extendByOneCharacter backward
         else

    super extend options, name: "caret", indicator: "Caret mode", alterMethod: "move"

    # Establish the initial caret.
    switch @selection.type
      when "None"
        @establishInitialSelectionAnchor()
        if @selection.type == "None"
          @exit()
          HUD.showForDuration "Create a selection before entering visual mode.", 2500
          return
      when "Range"
        @movement.collapseSelectionToAnchor()

    @movement.extendByOneCharacter forward
    @movement.scrollIntoView()

      commandHandler: @commandHandler.bind this

    # If there was a range selection when the user lanuched visual mode, then we retain the selection on exit.
    @shouldRetainSelectionOnExit = @options.userLaunchedMode and 0 < @selection.toString().length

    @onExit (event = null) =>
      if @shouldRetainSelectionOnExit
