patch 9.1.1795: Vim9: popup_show() may return void

Problem:  Vim9: popup_show() may return void
Solution: Modify popup_show() to return -1 for an invalid popup window
          id (Yegappan Lakshmanan).

fixes: #18389
closes: #18401

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2025-09-26 16:30:52 +00:00
committed by Christian Brabandt
parent 7bb733f6bf
commit 773054b976
7 changed files with 25 additions and 10 deletions

View File

@ -1,4 +1,4 @@
*popup.txt* For Vim version 9.1. Last change: 2025 Aug 27
*popup.txt* For Vim version 9.1. Last change: 2025 Sep 26
VIM REFERENCE MANUAL by Bram Moolenaar
@ -639,10 +639,17 @@ popup_settext({id}, {text}) *popup_settext()*
popup_show({id}) *popup_show()*
If {id} is a hidden popup, show it now.
For {id} see `popup_hide()`.
If {id} is the info popup it will be positioned next to the
current popup menu item.
Show a hidden popup window identified by {id}.
Use {id} as returned by |popup_create()|.
If the popup is currently hidden, it will be made visible.
See |popup_hide()| to hide a popup.
If {id} refers to an info popup, it will be positioned next to
the currently selected item in the popup menu.
Returns -1 if a popup window with {id} does not exist.
Returns 0 on success.
Return type: |Number|