Skip to main content

render

Function render 

Source
pub fn render(
    frame: &mut Frame<'_>,
    state: &AutocompleteState,
    screen: Rect,
    theme: &Theme,
)
Expand description

Render the popup as a floating layer over screen. Picks an anchor position adjacent to state.anchor, flipping above the cursor when there is no room below. Width grows to fit the longest visible row, capped at a reasonable maximum and the available screen width. Height is bounded by state.max_visible_rows; the popup never grows past it, even when the screen has more room available — keeping it visually subordinate to the editor.