mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Batch updates when moving cursors
This ensures that updates associated with autoscroll and cursor movement get combined.
This commit is contained in:
@@ -1472,7 +1472,8 @@ class Editor extends Model
|
||||
|
||||
moveCursors: (fn) ->
|
||||
@movingCursors = true
|
||||
fn(cursor) for cursor in @getCursors()
|
||||
@batchUpdates =>
|
||||
fn(cursor) for cursor in @getCursors()
|
||||
@mergeCursors()
|
||||
@movingCursors = false
|
||||
@emit 'cursors-moved'
|
||||
|
||||
Reference in New Issue
Block a user