         for selection in @editor.getSelections()
           selection.deleteSelectedText()
 
-    return super if @typedText?
+    return super if @insertedText?
 
     @vimState.activate('insert')
 

class ActivateInsertMode extends Operator
  @extend()
  complete: true
  typedText: null
  flashTarget: false

  initialize: ->
    @vimState.setCheckpoint() unless @typedText?

  # This uses private APIs and may break if TextBuffer is refactored.
  # Package authors - copy and paste this code at your own risk.

    @target.select()
    if @haveSomeSelection()
      @setTextToRegister @editor.getSelectedText()
      if @target.isLinewise?() and not @insertedText?
        for selection in @editor.getSelections()
          selection.insertText("\n", autoIndent: true)
          selection.cursor.moveLeft()
