mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
🎨
This commit is contained in:
@@ -195,7 +195,7 @@ class DisplayBuffer extends Model
|
||||
if defaultCharWidth isnt @defaultCharWidth or doubleWidthCharWidth isnt @doubleWidthCharWidth
|
||||
@defaultCharWidth = defaultCharWidth
|
||||
@doubleWidthCharWidth = doubleWidthCharWidth
|
||||
@updateWrappedScreenLines() if @isSoftWrapped()
|
||||
@updateWrappedScreenLines() if @isSoftWrapped() and @getWidth()?
|
||||
defaultCharWidth
|
||||
|
||||
getCursorWidth: -> 1
|
||||
@@ -265,14 +265,8 @@ class DisplayBuffer extends Model
|
||||
else
|
||||
@getEditorWidthInChars()
|
||||
|
||||
getMaxLengthPerLine: ->
|
||||
if @configSettings.softWrapAtPreferredLineLength
|
||||
Math.min(@getEditorWidthInChars(), @configSettings.preferredLineLength)
|
||||
else
|
||||
@getEditorWidthInChars()
|
||||
|
||||
getSoftWrapColumnForTokenizedLine: (tokenizedLine) ->
|
||||
lineMaxWidth = @getMaxLengthPerLine() * @getDefaultCharWidth()
|
||||
lineMaxWidth = Math.round(@getSoftWrapColumn() * @getDefaultCharWidth())
|
||||
iterator = tokenizedLine.getTokenIterator()
|
||||
column = 0
|
||||
currentWidth = 0
|
||||
|
||||
Reference in New Issue
Block a user