commit a4c4b39d55db087af19a5ed8b6a1e5ecacb0c615
parent 2eecb1b85dbb0e02ec40e95d28d3cc4720040f01
Author: James Barford-Evans <jamesbarfordevans@gmail.com>
Date: Mon, 16 Oct 2023 17:59:33 +0100
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
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua
@@ -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