   getEditorWidthInChars: ->
     @displayBuffer.getEditorWidthInChars()
 
+  onDidConfirmPendingState: (callback) ->
+    @emitter.on 'did-confirm-pending-state', callback
+
+  confirmPendingState: ->
+    @pending = false
+    @emitter.emit 'did-confirm-pending-state', this
+
   ###
   Section: File Details
   ###


  # Essential: Returns {Boolean} `true` if this editor has no content.
  isEmpty: -> @buffer.isEmpty()

  # Copies the current file path to the native clipboard.
  copyPathToClipboard: ->

      softWrapped, @displayBuffer, @selectionsMarkerLayer, buffer, suppressCursorCreation,
      @mini, @placeholderText, lineNumberGutterVisible, largeFileMode, @config,
      @notificationManager, @packageManager, @clipboard, @viewRegistry, @grammarRegistry,
      @project, @assert, @applicationDelegate, @pending
    } = params


    throw new Error("Must pass a config parameter when constructing TextEditors") unless @config?
    throw new Error("Must pass a notificationManager parameter when constructing TextEditors") unless @notificationManager?
