diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-12-22 16:06:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-22 16:06:46 -0800 |
commit | 7e1c1ff7fcf2cbc564c90a656124b70ad8bb4d5f (patch) | |
tree | a7f30855c9ef3304b0d7664413fcfebccc6b638b /runtime/doc | |
parent | 665a0e85c4788cb2847e270c333c0aee306f07ad (diff) | |
parent | a10636fbe7bb4dba45c42c64548e5e32fe8f8d12 (diff) | |
download | rneovim-7e1c1ff7fcf2cbc564c90a656124b70ad8bb4d5f.tar.gz rneovim-7e1c1ff7fcf2cbc564c90a656124b70ad8bb4d5f.tar.bz2 rneovim-7e1c1ff7fcf2cbc564c90a656124b70ad8bb4d5f.zip |
Merge #31661 cmdline_show/hide events
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/news.txt | 7 | ||||
-rw-r--r-- | runtime/doc/ui.txt | 16 |
2 files changed, 17 insertions, 6 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index eb04702ec2..c4ba4f0ad1 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -92,6 +92,13 @@ EVENTS • |vim.ui_attach()| callbacks for |ui-messages| `msg_show` events are executed in |api-fast| context. +• New/enhanced arguments in these existing UI events: + • `cmdline_show`: `hl_id` argument to highlight the prompt text. + • `cmdline_hide`: `abort` argument indicating if the cmdline was aborted. + • `msg_show`: + • `history` argument indicating if the message was added to the history. + • new message kinds: "bufwrite", "completion", "list_cmd", + "lua_print", "number_prompt", "search_cmd", "undo", "wildlist". HIGHLIGHTS diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index f531411354..1b11565eeb 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 @@ -783,7 +784,7 @@ will be set to zero, but can be changed and used for the replacing cmdline or message window. Cmdline state is emitted as |ui-cmdline| events, which the UI must handle. -["msg_show", kind, content, replace_last] ~ +["msg_show", kind, content, replace_last, history] ~ Display a message to the user. kind @@ -826,6 +827,9 @@ must handle. true: Replace the message in the most-recent `msg_show` call, but any other visible message should still remain. + history + True if the message was added to the |:messages| history. + ["msg_clear"] ~ Clear all messages currently displayed by "msg_show". (Messages sent by other "msg_" events below will not be affected). |