From 50d1f978b62bd533727db7d61946f84a3934cd66 Mon Sep 17 00:00:00 2001 From: Will Hopkins Date: Tue, 10 Oct 2023 20:42:22 -0700 Subject: [PATCH] fix: set winminwidth/height before winwidth/height --- lua/focus/modules/resizer.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/focus/modules/resizer.lua b/lua/focus/modules/resizer.lua index 1205c1b..ff3e519 100644 --- a/lua/focus/modules/resizer.lua +++ b/lua/focus/modules/resizer.lua @@ -113,10 +113,12 @@ function M.split_resizer(config, goal) --> Only resize normal buffers, set qf to or vim.api.nvim_win_get_config(0).relative ~= '' or not config.autoresize.enable then - vim.o.winwidth = 1 + -- Setting minwidth/minheight must be done before setting width/height + -- to avoid errors when winminwidth and winminheight are larger than 1. vim.o.winminwidth = 1 - vim.o.winheight = 1 vim.o.winminheight = 1 + vim.o.winwidth = 1 + vim.o.winheight = 1 return else if config.autoresize.minwidth > 0 then