Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GroupsListCustomDelegate ¶
type GroupsListCustomDelegate struct {
// contains filtered or unexported fields
}
func (GroupsListCustomDelegate) Height ¶
func (d GroupsListCustomDelegate) Height() int
Height must agree with the rows Render actually emits: one title line inside the wrapper's Padding(1), so three. The list budgets Height() rows per item when it works out how many fit on a page, but it then prints whatever Render returns - so a Height() larger than the row both pages the list earlier than it needs to and pads the shortfall out as dead space above the paginator. The row lost its description line and this was left at 4, which is where the gap came from. TestDelegateHeightMatchesTheRow holds the two together.
func (GroupsListCustomDelegate) Spacing ¶
func (d GroupsListCustomDelegate) Spacing() int
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (Model) FilterState ¶
func (m Model) FilterState() list.FilterState
FilterState exposes how much of the keyboard the list has taken, so AppModel can snapshot it into the help overlay's context.
func (Model) KeepsEsc ¶
KeepsEsc reports whether the list needs esc for itself: an applied filter is cleared by esc alone. Both body panels are always active now, so the list keeps esc whenever a filter is applied - AppModel's "back" checks this before it clears a selection.
func (Model) OwnsKeyboard ¶
OwnsKeyboard reports whether the list is taking every keystroke for itself, which it does while the user is typing a filter: n, d and q are letters then, not commands. Only while typing - once a filter is applied and the cursor is back in the rows, the panel keys mean what they always mean, and esc clears the filter. See model.AppModel.keyboardOwned.