Documentation
¶
Index ¶
- type Model
- func (m Model) IsVisible() bool
- func (m Model) Query() string
- func (m *Model) SetQuery(q string)
- func (m *Model) SetRoles(r theme.Roles)
- func (m *Model) SetSize(width, height int)
- func (m *Model) SetVisible(visible bool)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type SearchResultMsg
- type Tab
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 overlay component.
func (*Model) SetQuery ¶
SetQuery pre-fills the search input, leaving the cursor at the end so the user can keep typing. It does not run the search — the overlay searches on Enter, and a command that both opened the overlay and fired a network request would be doing two things the caller only asked once for.
Call it AFTER SetVisible(true): making the overlay visible deliberately resets the query, so the reverse order silently discards the prefill.
func (*Model) SetRoles ¶ added in v0.0.29
SetRoles replaces the palette, and every widget style New derived from it: without restyle a new palette would recolour the box and leave the input, the tabs and the results inside it as they were.
func (*Model) SetSize ¶
SetSize sets the component dimensions. width/height are the FULL window size — the overlay computes its own centered, capped box from them (see computeGeometry) rather than stretching to fill the window.
func (*Model) SetVisible ¶
SetVisible shows or hides the search overlay.
type SearchResultMsg ¶
SearchResultMsg is emitted when a search result is selected.