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} 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.