mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Special case last row in TextBuffer::suggestedLineEndingForRow
This fixes the TextBuffer specs for changes in the underlying behavior of SharedString::lineEndingForRow in telepath.
This commit is contained in:
@@ -228,7 +228,10 @@ class TextBuffer
|
||||
@text.lineEndingForRow(row)
|
||||
|
||||
suggestedLineEndingForRow: (row) ->
|
||||
@lineEndingForRow(row) ? @lineEndingForRow(row - 1)
|
||||
if row is @getLastRow()
|
||||
@lineEndingForRow(row - 1)
|
||||
else
|
||||
@lineEndingForRow(row)
|
||||
|
||||
# Given a row, returns the length of the line of text.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user