Skip to content

Commit

Permalink
fix: set winminwidth/height before winwidth/height
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy authored and cryptomilk committed Oct 13, 2023
1 parent c83be53 commit 50d1f97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/focus/modules/resizer.lua
Expand Up @@ -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
Expand Down

0 comments on commit 50d1f97

Please sign in to comment.