aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-17 21:00:50 +0800
committerGitHub <noreply@github.com>2022-10-17 21:00:50 +0800
commit637ab296cba9e37e7374a8c076342487398605ee (patch)
treec49271b58bbe1f8d8cb9f265f7f2aac7fb6a757a /runtime
parent39911d76be560c998cc7dee51c5d94f811164f66 (diff)
downloadrneovim-637ab296cba9e37e7374a8c076342487398605ee.tar.gz
rneovim-637ab296cba9e37e7374a8c076342487398605ee.tar.bz2
rneovim-637ab296cba9e37e7374a8c076342487398605ee.zip
feat(api): nvim_select_popupmenu_item support cmdline pum (#20652)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt18
-rw-r--r--runtime/doc/news.txt2
2 files changed, 12 insertions, 8 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index f92ef26399..b949f3016e 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -1251,19 +1251,21 @@ nvim_replace_termcodes({str}, {from_part}, {do_lt}, {special})
*nvim_select_popupmenu_item()*
nvim_select_popupmenu_item({item}, {insert}, {finish}, {opts})
- Selects an item in the completion popupmenu.
+ Selects an item in the completion popup menu.
- If |ins-completion| is not active this API call is silently ignored.
- Useful for an external UI using |ui-popupmenu| to control the popupmenu
- with the mouse. Can also be used in a mapping; use <cmd> |:map-cmd| to
- ensure the mapping doesn't end completion mode.
+ If neither |ins-completion| nor |cmdline-completion| popup menu is active
+ this API call is silently ignored. Useful for an external UI using
+ |ui-popupmenu| to control the popup menu with the mouse. Can also be used
+ in a mapping; use <Cmd> |:map-cmd| or a Lua mapping to ensure the mapping
+ doesn't end completion mode.
Parameters: ~
• {item} Index (zero-based) of the item to select. Value of -1
selects nothing and restores the original text.
- • {insert} Whether the selection should be inserted in the buffer.
- • {finish} Finish the completion and dismiss the popupmenu. Implies
- `insert`.
+ • {insert} For |ins-completion|, whether the selection should be
+ inserted in the buffer. Ignored for |cmdline-completion|.
+ • {finish} Finish the completion and dismiss the popup menu. Implies
+ {insert}.
• {opts} Optional parameters. Reserved for future use.
*nvim_set_client_info()*
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 1dc9adcab1..f0632c022a 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -39,6 +39,8 @@ NEW FEATURES *news-features*
The following new APIs or features were added.
+|nvim_select_popupmenu_item()| now supports |cmdline-completion| popup menu.
+
==============================================================================
CHANGED FEATURES *news-changes*