0
0
mirror of https://github.com/vim/vim.git synced 2025-10-16 07:24:23 -04:00

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 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Sep 24
*builtin.txt* For Vim version 9.1. Last change: 2025 Sep 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -451,7 +451,7 @@ popup_setbuf({id}, {buf}) Bool set the buffer for the popup window {id}
popup_setoptions({id}, {options})
none set options for popup window {id}
popup_settext({id}, {text}) none set the text of popup window {id}
popup_show({id}) none unhide popup window {id}
popup_show({id}) Number unhide popup window {id}
pow({x}, {y}) Float {x} to the power of {y}
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
printf({fmt}, {expr1}...) String format text

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|