Documentation
¶
Overview ¶
Package searchmodal shows the incremental search prompt and its match counter. It holds no search logic: the parent model matches against the diff and pushes the query and the result counts in for display.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the search prompt. It mirrors state the parent model owns, so the query and counts it displays are only as current as the last SetQuery and UpdateResults call.
func (*Model) Hide ¶
func (m *Model) Hide()
Hide closes the prompt, leaving the query in place for the parent to read.
func (Model) IsVisible ¶
IsVisible reports whether the prompt is open, which is how the parent decides to route keys here.
func (*Model) SetQuery ¶
SetQuery replaces the displayed query. It runs no search, so the counts stay as UpdateResults left them until the parent calls it again.
func (*Model) Show ¶
func (m *Model) Show()
Show opens the prompt with the query and counts cleared, so a reopen never displays the previous search.
func (*Model) UpdateResults ¶
UpdateResults sets the match counter. The current index is 0-based and is displayed one higher, so pass -1 when no match is current.