       if desiredScrollRight > @getScrollRight()
         @setScrollRight(desiredScrollRight)
 
+  commitPendingScrollLeftPosition: ->
+    scrollLeft = @constrainScrollLeft(@pendingScrollLeft)
+    if scrollLeft isnt @scrollLeft and not Number.isNaN(scrollLeft)
+      @scrollLeft = scrollLeft
+      @model.setScrollLeft(scrollLeft)
+
+  commitPendingScrollTopPosition: ->
+    scrollTop = @constrainScrollTop(@pendingScrollTop)
+    if scrollTop isnt @scrollTop and not Number.isNaN(scrollTop)
+      @scrollTop = scrollTop
+      @model.setScrollTop(scrollTop)
+
+  updateScrollPosition: ->
+    @commitPendingLogicalScrollPosition() if @pendingScrollLogicalPosition?
+    @commitPendingScrollLeftPosition() if @pendingScrollLeft?
+    @commitPendingScrollTopPosition() if @pendingScrollTop?
+
+    @pendingScrollTop = null
+    @pendingScrollLeft = null
     @pendingScrollLogicalPosition = null

  getHorizontalScrollMarginInPixels: ->
    @model.getHorizontalScrollMargin() * @baseCharacterWidth

  updateScrollPosition: ->
    return unless @pendingScrollLogicalPosition?

    {screenRange, options} = @pendingScrollLogicalPosition

    verticalScrollMarginInPixels = @getVerticalScrollMarginInPixels()

    @emitDidUpdateState()

  setScrollLeft: (scrollLeft) ->
    return unless scrollLeft?

    @pendingScrollLeft = scrollLeft

    @shouldUpdateHorizontalScrollState = true
    @shouldUpdateHiddenInputState = true
    @shouldUpdateCursorsState = true
    @shouldUpdateOverlaysState = true
    @shouldUpdateDecorations = true
    @shouldUpdateLinesState = true

    @emitDidUpdateState()

  getScrollLeft: ->
    @scrollLeft
