         return
 
       @provider.updateRealFile(changes)
-      @emitModifiedStatusChanged(false)
+      @setModifiedState(false)
 
   # Just setting cursor position works but it lost goalColumn when that row was skip item's row.
   moveUpOrDown: (event, direction) ->

                # Delay immediate preview unless @provider is boundToEditor
                @autoPreviewOnNextStopChanging = true
      else
        @emitModifiedStatusChanged(true)

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

  withIgnoreCursorMove: (fn) ->
    @ignoreCursorMove = true


      if @isActive()
        @selectItemForRow(@findRowForNormalItem(0, 'next'))
      @setModifiedState(false)
      @emitDidRefresh()

  renderItems: (items) ->
