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:
Kevin Sawicki
2013-08-16 21:22:06 -07:00
parent 7f9b057c52
commit 65330a00e3

View File

@@ -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.
#