Soft wrap only when we know lineMaxWidth

This commit is contained in:
Antonio Scandurra
2015-10-16 11:14:20 +02:00
parent e843c2f058
commit 05c6c9f9be

View File

@@ -293,6 +293,10 @@ class DisplayBuffer extends Model
getSoftWrapColumnForTokenizedLine: (tokenizedLine) ->
lineMaxWidth = @getSoftWrapColumn() * @getDefaultCharWidth()
return if Number.isNaN(lineMaxWidth)
return 0 if lineMaxWidth is 0
iterator = tokenizedLine.getTokenIterator(false)
column = 0
currentWidth = 0