bufresize.nvim
bufresize.nvim copied to clipboard
bufresize.nvim with trouble.nvim window changes cmdheight upon terminal resize
Opening and closing Trouble.nvim's quickfix window causes bufresize.nvim to incorrectly change the cmdheight when the terminal pane is resized in tmux.
See video:
https://asciinema.org/a/622159
I fixed this by creating an autocmd that sets the cmdheight back to the original value on event VimResized.
Example with lazy.nvim:
return {
"kwkarlwang/bufresize.nvim",
config = function()
require("bufresize").setup()
-- Fix cmdheight changing when using trouble.nvim
vim.g.cmdheight = vim.o.cmdheight
vim.api.nvim_create_autocmd("VimResized", {
callback = function()
vim.o.cmdheight = vim.g.cmdheight
end
})
end,
}