Reduce variation of buffer row to screen row conversion error message

This commit is contained in:
Nathan Sobo 2014-02-27 10:34:57 -08:00
parent 746b99508b
commit 0c8bb089b9

View File

@ -293,10 +293,9 @@ class DisplayBuffer extends Model
for screenRow in [startScreenRow...endScreenRow]
unless screenLine = @screenLines[screenRow]
throw new Error """
No screen line exists for screen row #{screenRow}, converted from buffer position (#{row}, #{column})
Soft wrap enabled: #{@getSoftWrap()}
Fold count: #{@findFoldMarkers().length}
Last buffer row: #{@getLastRow()}
No screen line exists when converting a buffer row to a screen row
Soft wrap enabled?: #{@getSoftWrap()}
Folds exist?: #{@findFoldMarkers().length > 0}
"""
maxBufferColumn = screenLine.getMaxBufferColumn()
if screenLine.isSoftWrapped() and column > maxBufferColumn