Documentation
¶
Overview ¶
Package queue renders the queued messages overlay above the composer and lets the user inspect, navigate, and remove queued messages.
Index ¶
- type Model
- func (m Model) Active() bool
- func (m *Model) Close()
- func (m Model) Cursor() int
- func (m *Model) DeleteSelected() (string, bool)
- func (m *Model) Down()
- func (m Model) Height() int
- func (m *Model) InsertAt(i int, text string)
- func (m Model) Items() []string
- func (m Model) Len() int
- func (m *Model) Open(items []string)
- func (m *Model) SetItems(items []string)
- func (m *Model) SetWidth(w int)
- func (m *Model) Up()
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
Model manages queued messages and the overlay presentation.
func (Model) Cursor ¶ added in v0.1.2
Cursor reports the index of the selected item, or -1 when the queue is empty. -1 is the pinned empty-queue sentinel; callers guard on idx < 0 before indexing.
func (*Model) DeleteSelected ¶
DeleteSelected removes the currently highlighted item from the queue and returns it.
func (*Model) InsertAt ¶ added in v0.1.2
InsertAt puts text back at index i, clamping i into [0, len(items)]. It is the undo for a DeleteSelected whose send then failed.
Click to show internal directories.
Click to hide internal directories.