mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
trigger buffer-change after the change, not before
This commit is contained in:
@@ -186,10 +186,11 @@ class Buffer
|
||||
@change(range, '')
|
||||
|
||||
change: (oldRange, newText) ->
|
||||
@trigger 'buffer-change'
|
||||
oldRange = Range.fromObject(oldRange)
|
||||
operation = new BufferChangeOperation({buffer: this, oldRange, newText})
|
||||
@pushOperation(operation)
|
||||
range = @pushOperation(operation)
|
||||
@trigger 'buffer-change'
|
||||
range
|
||||
|
||||
clipPosition: (position) ->
|
||||
{ row, column } = Point.fromObject(position)
|
||||
|
||||
Reference in New Issue
Block a user