       else
         @setModifiedState(true)
 
-  withIgnoreCursorMove: (fn) ->
-    @ignoreCursorMove = true
-    fn()
-    @ignoreCursorMove = false
-
-  withIgnoreChange: (fn) ->
-    @ignoreChange = true
-    fn()
-    @ignoreChange = false
-
   observeCursorMove: ->
     @editor.onDidChangeCursorPosition (event) =>
       return if @ignoreCursorMove

  readOnly: false
  protected: false
  excludedFiles: null

  isModified: ->
    @modifiedState

  setModifiedState: (state) ->
    if state isnt @modifiedState
      # HACK: overwrite TextBuffer:isModified to return static state.
      # This state is used for tabs package to show modified icon on tab.
      @modifiedState = state
      @editor.buffer.isModified = -> state
      @editor.buffer.emitModifiedStatusChanged(state)

  onDidMoveToPrompt: (fn) -> @emitter.on('did-move-to-prompt', fn)
  emitDidMoveToPrompt: -> @emitter.emit('did-move-to-prompt')


  hasNormalItem: ->
    @items.some (item) -> (not item.skip)

  hasSomeNormalItemForFilePath: (filePath) ->
    @items.some (item) ->
