pub enum Action {
Submit,
HistoryPrev,
HistoryNext,
HistorySearch(String),
HistoryAccept,
HistoryCancel,
Cancel,
SubmitCommand(String),
}Expand description
Actions the editor can request from the host.
Variants§
Submit
User wants to submit the current input.
HistoryPrev
User wants previous history entry. Emitted by Up in any mode and
by k in Normal mode when the cursor is on the first line of the
buffer (single-line REPL inputs are always at the first line).
HistoryNext
User wants next history entry. Emitted by Down in any mode and by
j in Normal mode when the cursor is on the last line of the buffer.
HistorySearch(String)
User is incrementally building a history-search query. The string is
the current full query, not a delta — hosts feed it to
history::Store::search and preview the top match.
Reserved for a future search sub-mode; not currently emitted by
vim-line itself. Hosts that ship their own / input loop can
emit this from their dispatch to keep the contract single-vocabulary.
HistoryAccept
User accepted the previewed history match. Reserved for the future
search sub-mode; not currently emitted by vim-line.
HistoryCancel
User canceled a history search and wants the pre-search input
restored. Reserved for the future search sub-mode; not currently
emitted by vim-line.
Cancel
User wants to cancel/abort.
SubmitCommand(String)
User submitted an Ex-style command line (without the leading :).