Imprecise documentation of popup_close()

24 views
Skip to first unread message

Lifepillar

unread,
Jan 8, 2025, 7:56:24 AMJan 8
to vim...@googlegroups.com
According to `:help popup_close()`, when a popup is closed the "window
and the associated buffer will be deleted". That is not the case,
however, if the popup was created with an existing buffer, e.g.:

vim9script
var bufnr = bufadd('Popup buffer')
var winid = popup_create(bufnr, {})
popup_close(winid)
echo bufexists(bufnr)

So, I think that the help should be amended with an additional sentence:
"If the popup was created with an existing buffer then only the popup
window will be closed." or something along those lines.

Life.

Christian Brabandt

unread,
Jan 8, 2025, 8:10:59 AMJan 8
to vim...@googlegroups.com
Thanks, fixed as of Commit 1f045f324d0a8e9e897e5e

Thanks,
Christian
--
Just because you're paranoid doesn't mean they AREN'T after you.
Reply all
Reply to author
Forward
0 new messages