Skip to content

Commit

Permalink
optimize CodeEditorView to use accurate line number width which resul…
Browse files Browse the repository at this point in the history
…ts in one less time full text layout
  • Loading branch information
sunny-chung committed Nov 25, 2024
1 parent c0d8021 commit 666ad9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ fun BigTextLineNumbersView(
firstRow = visibleRows.first,
lastRow = visibleRows.endInclusive + 1,
rowToLineIndex = { layoutText?.findOriginalLineIndexByRowIndex(it) ?: 0 },
totalLines = layoutText?.numOfOriginalLines ?: 1,
totalLines = layoutText?.numOfOriginalLines ?: bigText.numOfLines,
lineHeight = (rowHeight).toDp(),
getRowOffset = {
(it * rowHeight - viewportTop).toDp()
Expand Down

0 comments on commit 666ad9c

Please sign in to comment.