mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Soft wrap only when we know lineMaxWidth
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user