Skip to content

Commit 3b44c3c

Browse files
committed
fix(ui): reset buf and win options on resize
1 parent 5aca928 commit 3b44c3c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lua/lazy/view/float.lua

+11-5
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,15 @@ function M:mount()
103103
if vim.bo[self.buf].filetype == "" then
104104
vim.bo[self.buf].filetype = "lazy"
105105
end
106-
vim.bo[self.buf].bufhidden = "wipe"
107-
vim.wo[self.win].conceallevel = 3
108-
vim.wo[self.win].spell = false
109-
vim.wo[self.win].wrap = true
110-
vim.wo[self.win].winhighlight = "Normal:LazyNormal"
106+
107+
local function opts()
108+
vim.bo[self.buf].bufhidden = "wipe"
109+
vim.wo[self.win].conceallevel = 3
110+
vim.wo[self.win].spell = false
111+
vim.wo[self.win].wrap = true
112+
vim.wo[self.win].winhighlight = "Normal:LazyNormal"
113+
end
114+
opts()
111115

112116
vim.api.nvim_create_autocmd("VimResized", {
113117
callback = function()
@@ -120,7 +124,9 @@ function M:mount()
120124
---@diagnostic disable-next-line: no-unknown
121125
config[key] = self.win_opts[key]
122126
end
127+
config.style = self.opts.style ~= "" and self.opts.style or nil
123128
vim.api.nvim_win_set_config(self.win, config)
129+
opts()
124130
vim.cmd([[do User LazyFloatResized]])
125131
end,
126132
})

0 commit comments

Comments
 (0)