 
   confirmChanges: (checkpoint) ->
     changes = @getChangesSinceCheckpoint(checkpoint)
-    @typedText = if (range = getInsertedRange(changes))?
+    @insertedText = if (range = getInsertedRange(changes))?
       @editor.getTextInBufferRange(range)
     else
       ""
 
   execute: ->
-    if @typedText?
-      return unless @typedText
-      @editor.insertText(@typedText, normalizeLineEndings: true, autoIndent: true)
+    if @insertedText?
+      return unless @insertedText
+      @editor.insertText(@insertedText, normalizeLineEndings: true, autoIndent: true)
       for cursor in @editor.getCursors() when not cursor.isAtBeginningOfLine()
         cursor.moveLeft()
     else

  @extend()

  execute: ->
    if @typedText?
      return unless @typedText
      @editor.transact =>
        @editor.insertText(@typedText, normalizeLineEndings: true)
        toDelete = @typedText.length - @countChars('\n', @typedText)
        for selection in @editor.getSelections()
          count = toDelete
          selection.delete() while count-- and not selection.cursor.isAtEndOfLine()

      when 'below' then @editor.insertNewlineBelow()
    @editor.getLastCursor().skipLeadingWhitespace()

    if @insertedText?
      # We'll have captured the inserted newline, but we want to do that
      # over again by hand, or differing indentations will be wrong.
      @insertedText = @insertedText.trimLeft()
      super
    else
      @vimState.activate('insert')
