diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-12-20 21:11:38 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-12-22 15:23:43 +0100 |
commit | 394f69a25dc32c5b101ba2d34ac6376b0c75b2a2 (patch) | |
tree | 8609bdc18c695c585a65a3c7733830ad87fa5a2d /runtime/doc/ui.txt | |
parent | e1c2179dd93ed2cd787b1cd016606b1901a1acfe (diff) | |
download | rneovim-394f69a25dc32c5b101ba2d34ac6376b0c75b2a2.tar.gz rneovim-394f69a25dc32c5b101ba2d34ac6376b0c75b2a2.tar.bz2 rneovim-394f69a25dc32c5b101ba2d34ac6376b0c75b2a2.zip |
feat(ui): additional arguments for cmdline_show/hide events
Problem: Unable to tell what highlight the prompt part of a
cmdline_show event should have, and whether cmdline_hide was
emitted after aborting.
Solution: Add additional arguments hl_id to cmdline_show, and abort to
cmdline_hide.
Diffstat (limited to 'runtime/doc/ui.txt')
-rw-r--r-- | runtime/doc/ui.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index f531411354..0082e9d76b 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -715,7 +715,7 @@ Activated by the `ext_cmdline` |ui-option|. This UI extension delegates presentation of the |cmdline| (except 'wildmenu'). For command-line 'wildmenu' UI events, activate |ui-popupmenu|. -["cmdline_show", content, pos, firstc, prompt, indent, level] ~ +["cmdline_show", content, pos, firstc, prompt, indent, level, hl_id] ~ content: List of [attrs, string] [[{}, "t"], [attrs, "est"], ...] @@ -728,8 +728,8 @@ For command-line 'wildmenu' UI events, activate |ui-popupmenu|. `firstc` and `prompt` are text, that if non-empty should be displayed in front of the command line. `firstc` always indicates built-in command lines such as `:` (ex command) and `/` `?` (search), - while `prompt` is an |input()| prompt. `indent` tells how many spaces - the content should be indented. + while `prompt` is an |input()| prompt, highlighted with `hl_id`. + `indent` tells how many spaces the content should be indented. The Nvim command line can be invoked recursively, for instance by typing `<c-r>=` at the command line prompt. The `level` field is used @@ -749,8 +749,9 @@ For command-line 'wildmenu' UI events, activate |ui-popupmenu|. Should be hidden at next cmdline_show. -["cmdline_hide"] ~ - Hide the cmdline. +["cmdline_hide", abort] ~ + Hide the cmdline. `abort` is true if the cmdline is hidden after an + aborting condition (|c_Esc| or |c_CTRL-C|). ["cmdline_block_show", lines] ~ Show a block of context to the current command line. For example if |