drawSelectionOverlay

fun Modifier.drawSelectionOverlay(state: EditorState, lineFrom: Int, lineTo: Int, theme: EditorTheme, textLayoutResult: TextLayoutResult? = null, tabOffsetMap: IntArray? = null): Modifier

Draw the cursor and selection ranges as a per-line Modifier overlay.

Only draws the portion of the selection that intersects the given line, using coordinates local to the line's composable.

Parameters

state

Current editor state.

lineFrom

Document offset of the start of this line.

lineTo

Document offset of the end of this line.

theme

Editor theme for colors.

textLayoutResult

Layout result for accurate character positioning.