Test that the logical scroll event is triggered

This commit is contained in:
Antonio Scandurra
2015-09-23 10:53:20 +02:00
parent e75812cfbf
commit 49fae9b029
2 changed files with 9 additions and 31 deletions

View File

@@ -362,7 +362,7 @@ class DisplayBuffer extends Model
{start, end} = selection.getScreenRange()
@intersectsVisibleRowRange(start.row, end.row + 1)
logicalScrollToScreenRange: (screenRange, options) ->
logicalScrollToScreenRange: (screenRange, options = {}) ->
scrollEvent = {screenRange, options}
@emitter.emit "did-change-scroll-position", scrollEvent
@@ -389,14 +389,6 @@ class DisplayBuffer extends Model
desiredScrollLeft = left - horizontalScrollMarginInPixels
desiredScrollRight = right + horizontalScrollMarginInPixels
if global.enableLogs
console.log "====== DB ======"
console.log "Screen Range: #{screenRange.toString()}"
console.log "Client Width: #{@getClientWidth()}"
console.log "#{desiredScrollLeft}/#{desiredScrollRight}"
console.log "#{@getScrollLeft()}/#{@getScrollRight()}"
console.log "================"
if options?.reversed ? true
if desiredScrollBottom > @getScrollBottom()
@setScrollBottom(desiredScrollBottom)