mirror of
https://github.com/neovim/neovim.git
synced 2026-08-01 05:09:08 +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.
(cherry picked from commit a6827be98f)
This commit is contained in:
committed by
github-actions[bot]
parent
7d80e18207
commit
d427d38d06
@@ -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