Documentation
¶
Overview ¶
Package overlay is the shared fuzzy-picker component behind the command palette and the file finder: an input line over a filtered, scrollable list. The host supplies items and receives the chosen index.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CursorInto ¶ added in v0.16.0
CursorInto renders s with the block cursor at rune position cur.
Types ¶
type Item ¶
Item is one pickable row. Label is fuzzy-matched; Detail is dimmed, right-aligned (a keybinding, a directory).
type Model ¶
type Model struct {
Title string
// contains filtered or unexported fields
}
func (*Model) ClickRow ¶ added in v0.13.1
ClickRow selects the visible list row y (0 = the row right under the title) and reports whether it holds an item — false for a click on the box chrome or past the end of the list.
func (Model) Selected ¶
Selected returns the highlighted item's index into the original items, or -1 when the filter has no matches.
func (Model) Update ¶
Update handles a key. done=true means the overlay is finished: chosen is the picked item's index into the original items, or -1 on cancel.