mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Store autoscroll state on Selection and Cursor models
This commit is contained in:
@@ -794,13 +794,13 @@ class Editor extends View
|
||||
do (cursorView) -> cursorView.resetBlinking()
|
||||
|
||||
autoscroll: (options={}) ->
|
||||
for cursorView in @getCursorViews() when cursorView.needsAutoscroll
|
||||
for cursorView in @getCursorViews() when cursorView.needsAutoscroll()
|
||||
@scrollTo(cursorView.getPixelPosition()) unless options.suppressAutoScroll
|
||||
cursorView.needsAutoscroll = false
|
||||
cursorView.autoscrolled()
|
||||
|
||||
for selectionView in @getSelectionViews() when selectionView.selection.needsAutoscroll
|
||||
for selectionView in @getSelectionViews() when selectionView.needsAutoscroll()
|
||||
@scrollTo(selectionView.getCenterPixelPosition(), center: true)
|
||||
selectionView.selection.needsAutoscroll = false
|
||||
selectionView.autoscrolled()
|
||||
|
||||
updateRenderedLines: ->
|
||||
firstVisibleScreenRow = @getFirstVisibleScreenRow()
|
||||
|
||||
Reference in New Issue
Block a user