mirror of
https://github.com/neovim/neovim.git
synced 2026-07-21 16:41:38 +00:00
fix(man.lua): cache pages until width changes #40607
Problem: :Man unloads hidden buffers, so reopening large pages reruns rendering even when the width is unchanged. Solution: keep regular man buffers loaded and refresh them only when the effective width changes.
This commit is contained in:
@@ -37,3 +37,14 @@ vim.api.nvim_create_autocmd('BufReadCmd', {
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('BufWinEnter', {
|
||||
group = augroup,
|
||||
pattern = 'man://*',
|
||||
callback = function()
|
||||
local err = require('man').refresh_page()
|
||||
if err then
|
||||
vim.notify('man.lua: ' .. err, vim.log.levels.ERROR)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user