 
 
   updateLineNumbersState: ->
-    if @isInBatchMode()
+    if @isBatching()
       @shouldUpdateLineNumbersState = true
-      @emitter.emit "did-update-state"
+      @needsRefresh()
     else
       return unless @startRow? and @endRow? and @lineHeight?
 

      decorationState.flashCount++
      decorationState.flashClass = flash.class
      decorationState.flashDuration = flash.duration
      @emitter.emit "did-update-state"

  didAddDecoration: (decoration) ->
    @observeDecoration(decoration)



  updateHiddenInputState: ->
    if @isBatching()
      @shouldUpdateHiddenInputState = true
      @needsRefresh()
    else
      return unless lastCursor = @model.getLastCursor()

