aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Barford-Evans <jamesbarfordevans@gmail.com>2023-10-16 17:59:33 +0100
committerGitHub <noreply@github.com>2023-10-16 09:59:33 -0700
commita4c4b39d55db087af19a5ed8b6a1e5ecacb0c615 (patch)
tree42571dc83b651711fa556ff24b4659e95b0dea63
parent2eecb1b85dbb0e02ec40e95d28d3cc4720040f01 (diff)
downloadrneovim-a4c4b39d55db087af19a5ed8b6a1e5ecacb0c615.tar.gz
rneovim-a4c4b39d55db087af19a5ed8b6a1e5ecacb0c615.tar.bz2
rneovim-a4c4b39d55db087af19a5ed8b6a1e5ecacb0c615.zip
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
-rw-r--r--runtime/lua/man.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua
index f2bd79aca8..dcdfc2b87f 100644
--- 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