previousNonBlankRow returns null if passed row 0

This commit is contained in:
Corey Johnson
2012-08-09 14:19:12 -07:00
parent 9e53751717
commit 34934d58f9

View File

@@ -327,6 +327,8 @@ class Buffer
not /\S/.test @lineForRow(row)
previousNonBlankRow: (startRow) ->
return null if startRow == 0
startRow = Math.min(startRow, @getLastRow())
for row in [(startRow - 1)..0]
return row unless @isRowBlank(row)