AutocompleteMatch

data class AutocompleteMatch(val trigger: AutocompleteTrigger, val query: String, val range: IntRange, val queryRange: IntRange, val cursorPosition: Int, val cursorRect: Rect? = null)

Represents an active autocompletion trigger match at the current cursor position.

Constructors

Link copied to clipboard
constructor(trigger: AutocompleteTrigger, query: String, range: IntRange, queryRange: IntRange, cursorPosition: Int, cursorRect: Rect? = null)

Properties

Link copied to clipboard

The position of the cursor when this match occurred.

Link copied to clipboard
val cursorRect: Rect? = null

The bounding rectangle of the cursor in local viewport coordinates (scroll-adjusted), if available.

Link copied to clipboard

The search query typed after the trigger prefix up to the cursor.

Link copied to clipboard

The range corresponding to the query string.

Link copied to clipboard

The full range from the trigger prefix start to the cursor position (e.g., 0..4 for "@user").

Link copied to clipboard

Functions

Link copied to clipboard

Creates a PopupPositionProvider that positions a suggestion popup below (or above if constrained) the cursor of this AutocompleteMatch.