diffview-plus.nvim
diffview-plus.nvim copied to clipboard
[proposal] Auto resize diff splits on resizing terminal
Hello
When running in multi split terminal (not vim itself) , and with diffview opened in one of the splits (let's say in the left) when i'm resizing terminal splits - the diff splits are not adjusted automatically.
Currenly I'm workarounding this by
vim.api.nvim_create_autocmd("VimResized", {
group = vim.api.nvim_create_augroup("diffview.resize", {}),
callback = function()
if vim.wo.diff then
vim.cmd("wincmd =")
end
end,
desc = "Equalise diff windows on terminal resize",
})
My proposal is to add this autocmd to the plugin by default.