mirror of
https://github.com/atom/atom.git
synced 2026-02-14 16:45:14 -05:00
🐛 fix selection of penultimate row to retrieve line ending
This commit is contained in:
@@ -1132,7 +1132,7 @@ class TextEditor extends Model
|
||||
|
||||
# Delete lines spanned by selection and insert them on the preceding buffer row
|
||||
lines = @buffer.getTextInRange(linesRange)
|
||||
lines += @buffer.lineEndingForRow(linesRange.end.row - 1) unless lines[lines.length - 1] is '\n'
|
||||
lines += @buffer.lineEndingForRow(linesRange.end.row - 2) unless lines[lines.length - 1] is '\n'
|
||||
@buffer.delete(linesRange)
|
||||
@buffer.insert([precedingRow, 0], lines)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user