diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-17 21:00:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 21:00:50 +0800 |
commit | 637ab296cba9e37e7374a8c076342487398605ee (patch) | |
tree | c49271b58bbe1f8d8cb9f265f7f2aac7fb6a757a /src/nvim/api/vim.c | |
parent | 39911d76be560c998cc7dee51c5d94f811164f66 (diff) | |
download | rneovim-637ab296cba9e37e7374a8c076342487398605ee.tar.gz rneovim-637ab296cba9e37e7374a8c076342487398605ee.tar.bz2 rneovim-637ab296cba9e37e7374a8c076342487398605ee.zip |
feat(api): nvim_select_popupmenu_item support cmdline pum (#20652)
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index fa8d26914a..0c0c71b694 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -1908,19 +1908,20 @@ Object nvim_get_proc(Integer pid, Error *err) return rvobj; } -/// Selects an item in the completion popupmenu. -/// -/// 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. -/// -/// @param item Index (zero-based) of the item to select. Value of -1 selects -/// nothing and restores the original text. -/// @param insert Whether the selection should be inserted in the buffer. -/// @param finish Finish the completion and dismiss the popupmenu. Implies -/// `insert`. -/// @param opts Optional parameters. Reserved for future use. +/// Selects an item in the completion popup menu. +/// +/// 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. +/// +/// @param item Index (zero-based) of the item to select. Value of -1 selects nothing +/// and restores the original text. +/// @param insert For |ins-completion|, whether the selection should be inserted in the buffer. +/// Ignored for |cmdline-completion|. +/// @param finish Finish the completion and dismiss the popup menu. Implies {insert}. +/// @param opts Optional parameters. Reserved for future use. /// @param[out] err Error details, if any void nvim_select_popupmenu_item(Integer item, Boolean insert, Boolean finish, Dictionary opts, Error *err) |