mirror of
https://github.com/atom/atom.git
synced 2026-02-12 15:45:23 -05:00
Detect batch cursor move
This commit is contained in:
@@ -1804,8 +1804,16 @@ class TextEditor extends Model
|
||||
@emitter.emit 'did-remove-cursor', cursor
|
||||
|
||||
moveCursors: (fn) ->
|
||||
@emitter.emit "will-move-cursors"
|
||||
fn(cursor) for cursor in @getCursors()
|
||||
@mergeCursors()
|
||||
@emitter.emit "did-move-cursors"
|
||||
|
||||
onWillMoveCursors: (callback) ->
|
||||
@emitter.on "will-move-cursors", callback
|
||||
|
||||
onDidMoveCursors: (callback) ->
|
||||
@emitter.on "did-move-cursors", callback
|
||||
|
||||
cursorMoved: (event) ->
|
||||
@emit 'cursor-moved', event
|
||||
|
||||
Reference in New Issue
Block a user