mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Use position translation to detect soft wraps when rendering line nums
Signed-off-by: Antonio Scandurra <as-cii@github.com>
This commit is contained in:
committed by
Antonio Scandurra
parent
ef99fbcf0b
commit
20088cff75
@@ -596,7 +596,8 @@ class TextEditorPresenter
|
||||
line = @linesByScreenRow.get(screenRow)
|
||||
continue unless line?
|
||||
lineId = line.id
|
||||
{bufferRow, softWrappedAtStart: softWrapped} = @displayLayer.softWrapDescriptorForScreenRow(screenRow)
|
||||
{row: bufferRow, column: bufferColumn} = @displayLayer.translateScreenPosition(Point(screenRow, 0))
|
||||
softWrapped = bufferColumn isnt 0
|
||||
foldable = not softWrapped and @model.isFoldableAtBufferRow(bufferRow)
|
||||
decorationClasses = @lineNumberDecorationClassesForRow(screenRow)
|
||||
blockDecorationsBeforeCurrentScreenRowHeight = @lineTopIndex.pixelPositionAfterBlocksForRow(screenRow) - @lineTopIndex.pixelPositionBeforeBlocksForRow(screenRow)
|
||||
|
||||
Reference in New Issue
Block a user