mirror of
https://github.com/atom/atom.git
synced 2026-02-05 04:05:05 -05:00
Autoscroll the last cursor when it inserts text
Normally, we don't autoscroll to a cursor when the buffer changes. But this is a change caused by the cursor itself, so it makes sense to keep it in view.
This commit is contained in:
@@ -154,6 +154,7 @@ class Selection
|
||||
wasReversed = @isReversed()
|
||||
text = @normalizeIndent(text, options) if options.normalizeIndent
|
||||
@clear()
|
||||
@cursor.needsAutoscroll = @cursor.isLastCursor()
|
||||
newBufferRange = @editSession.buffer.change(oldBufferRange, text)
|
||||
if options.select
|
||||
@setBufferRange(newBufferRange, reverse: wasReversed)
|
||||
|
||||
Reference in New Issue
Block a user