     @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 =>
-      @batchMode = true
-
-    @disposables.add @model.onDidMoveCursors =>
-      @batchMode = false
-
-      @updateStartRow()
-      @updateEndRow()
-      @updateHeightState()
-      @didStartScrolling()
-      @updateVerticalScrollState()
-      @updateHorizontalScrollState()
-      @updateScrollbarsState()
-      @updateContentState()
-      @updateDecorations()
-      @updateLinesState()
-      @updateGutterState()
-      @updateLineNumbersState()
-
-    @disposables.add @model.onWillSelectMultiple =>
-      @batchMode = true
-
-    @disposables.add @model.onDidSelectMultiple =>
-      @batchMode = false
-
-      @updateStartRow()
-      @updateEndRow()
-      @updateHeightState()
-      @didStartScrolling()
-      @updateVerticalScrollState()
-      @updateHorizontalScrollState()
-      @updateScrollbarsState()
-      @updateContentState()
-      @updateDecorations()
-      @updateLinesState()
-      @updateGutterState()
-      @updateLineNumbersState()
+    @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 @batchMode
+      return if @isInBatchMode()
 
       @updateContentDimensions()
       @updateEndRow()

    unless @scrollTop is scrollTop or Number.isNaN(scrollTop)
      @scrollTop = scrollTop
      @model.setScrollTop(scrollTop)
      return if @batchMode

      @updateStartRow()
      @updateEndRow()

    @disposables.add(decorationDisposables)

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

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