       @updateOverlaysState()
 
   didDestroyDecoration: (decoration) ->
-    return if @batchMode
+    return if @isInBatchMode()
 
     if decoration.isType('line') or decoration.isType('line-number')
       @removeFromLineDecorationCaches(decoration, decoration.getMarker().getScreenRange())

    @disposables.add(decorationDisposables)

  decorationMarkerDidChange: (decoration, change) ->
    return if @batchMode

    if decoration.isType('line') or decoration.isType('line-number')
      return if change.textChanged

    @model.setVerticalScrollbarWidth(@measuredVerticalScrollbarWidth) if @measuredVerticalScrollbarWidth?
    @model.setHorizontalScrollbarHeight(@measuredHorizontalScrollbarHeight) if @measuredHorizontalScrollbarHeight?

  enterBatchMode: ->
    @batchMode = true

  isInBatchMode: ->
    @batchMode == true

  exitBatchMode: ->
    @batchMode = false

    @updateStartRow()
    @updateEndRow()
    @updateHeightState()
    @didStartScrolling()
    @updateVerticalScrollState()
    @updateHorizontalScrollState()
    @updateScrollbarsState()
    @updateContentState()
    @updateDecorations()
    @updateLinesState()
    @updateGutterState()
    @updateLineNumbersState()

  observeModel: ->
    @disposables.add @model.onWillMoveCursors => @enterBatchMode()
    @disposables.add @model.onDidMoveCursors => @exitBatchMode()
    @disposables.add @model.onWillSelectMultiple => @enterBatchMode()
    @disposables.add @model.onDidSelectMultiple => @exitBatchMode()

    @disposables.add @model.onDidChange =>
      return if @isInBatchMode()

      @updateContentDimensions()
      @updateEndRow()
