mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Clip range specified to change()
This commit is contained in:
@@ -655,7 +655,7 @@ class TextBuffer
|
||||
abort: -> @undoManager.abort()
|
||||
|
||||
change: (oldRange, newText, options={}) ->
|
||||
oldRange = Range.fromObject(oldRange)
|
||||
oldRange = @clipRange(oldRange)
|
||||
newText = @normalizeLineEndings(oldRange.start.row, newText) if options.normalizeLineEndings ? true
|
||||
operation = new BufferChangeOperation({buffer: this, oldRange, newText, options})
|
||||
range = @pushOperation(operation)
|
||||
|
||||
Reference in New Issue
Block a user