diff options
author | Christian Brabandt <cb@256bit.org> | 2024-06-18 20:50:58 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-06-18 21:01:23 +0200 |
commit | fbc37f138a5d70f1b212b9de9959a0816481edcf (patch) | |
tree | 17f8ace4a09dd5054c82e6f38491d3e2e0a7f0ca /runtime/doc/popup.txt | |
parent | 23c5ebeb95cb942df307946e3ced230a7c8312eb (diff) |
patch 9.1.0500: cannot switch buffer in a popupv9.1.0500
Problem: cannot switch buffer in a popup
(Yggdroot)
Solution: add popup_setbuf() function
fixes: #15006
closes: #15026
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc/popup.txt')
-rw-r--r-- | runtime/doc/popup.txt | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index 1ad4fb9f07..b9e992b04c 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 9.1. Last change: 2024 Jun 08 +*popup.txt* For Vim version 9.1. Last change: 2024 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -186,6 +186,7 @@ Manipulating a popup window: |popup_move()| change the position and size of a popup |popup_setoptions()| override options of a popup |popup_settext()| replace the popup buffer contents + |popup_setbuf()| set the buffer for the popup window Closing popup windows: |popup_close()| close one popup @@ -574,6 +575,18 @@ popup_notification({what}, {options}) *popup_notification()* Return type: |Number| +popup_setbuf({id}, {buf}) *popup_setbuf()* + Set buffer {buf} to be displayed in popup win {id}. For the + use of {buf}, see |bufname()| function. + May change window size or position to adjust for the size + of the buffer text. + + Can also be used as a |method|: > + GetPopup()->popup_setbuf(bufnr('foobar')) +< + Return type: |vim9-boolean| + + popup_setoptions({id}, {options}) *popup_setoptions()* Override options in popup {id} with entries in {options}. These options can be set: @@ -613,9 +626,8 @@ popup_setoptions({id}, {options}) *popup_setoptions()* popup_settext({id}, {text}) *popup_settext()* - Set the text of the buffer in popup win {id}. {text} is the - same as supplied to |popup_create()|, except that a buffer - number is not allowed. + Set the text of the buffer in popup win {id}. {text} is + a string or a list of strings to be displayed in the popup. Does not change the window size or position, other than caused by the different text. |