fix(man.lua): hardwrapped manpage is not resized #25646

Problem:
If a manpage is opened, its hardwrapped dimensions are not recalculated
after closing then revisiting the same manpage.

Solution:
Unload the manpage when it is hidden. This forces it to be reloaded,
which forces the hard-wrapping to be recalculated when it is revisited.

Fixes: #25457
This commit is contained in:
James Barford-Evans authored and GitHub committed 2023-10-16 09:59:33 -07:00
1 parent 2eecb1b85d
commit a4c4b39d55
1 file changed
+1 -1
+1 -1
View File
@@ -415,7 +415,7 @@ end
local function set_options(pager)
vim.bo.swapfile = false
vim.bo.buftype = 'nofile'
vim.bo.bufhidden = 'hide'
vim.bo.bufhidden = 'unload'
vim.bo.modified = false
vim.bo.readonly = true
vim.bo.modifiable = false