mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
In buffer change event objects, rename 'string' to 'newText'
In preparation for adding an 'oldText' value.
This commit is contained in:
@@ -116,7 +116,7 @@ describe 'Buffer', ->
|
||||
expect(changeHandler).toHaveBeenCalled()
|
||||
|
||||
[event] = changeHandler.argsForCall[0]
|
||||
expect(event.string).toBe newText
|
||||
expect(event.newText).toBe newText
|
||||
expect(event.oldRange).toEqual expectedPreRange
|
||||
expect(event.newRange).toEqual(new Range([0, 0], [1, 14]))
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class Buffer
|
||||
newTextLines[lastLineIndex] += suffix
|
||||
|
||||
@lines[oldRange.start.row..oldRange.end.row] = newTextLines
|
||||
@trigger 'change', { oldRange, newRange, string: newText }
|
||||
@trigger 'change', { oldRange, newRange, newText }
|
||||
|
||||
save: ->
|
||||
if not @path then throw new Error("Tried to save buffer with no url")
|
||||
|
||||
Reference in New Issue
Block a user