Move cursors within a transaction to batch marker layer update events

Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
Antonio Scandurra
2017-05-05 19:47:23 +02:00
parent df4116d4aa
commit a7f658a40f

View File

@@ -2341,8 +2341,9 @@ class TextEditor extends Model
cursor
moveCursors: (fn) ->
fn(cursor) for cursor in @getCursors()
@mergeCursors()
@transact =>
fn(cursor) for cursor in @getCursors()
@mergeCursors()
cursorMoved: (event) ->
@emitter.emit 'did-change-cursor-position', event