Wednesday, January 8, 2025

Imprecise documentation of popup_close()

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.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/vllsl0%24umv%241%40ciao.gmane.io.

No comments: