mirror of https://github.com/folke/lazy.nvim.git
feat(ui): re-render after resize. Fixes #174
This commit is contained in:
parent
1d3da277da
commit
9a2ecc8750
|
@ -119,6 +119,7 @@ function M:mount()
|
||||||
config[key] = self.opts.win_opts[key]
|
config[key] = self.opts.win_opts[key]
|
||||||
end
|
end
|
||||||
vim.api.nvim_win_set_config(self.win, config)
|
vim.api.nvim_win_set_config(self.win, config)
|
||||||
|
vim.cmd([[do User LazyFloatResized]])
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,7 +55,7 @@ function M.create()
|
||||||
self.render = Render.new(self)
|
self.render = Render.new(self)
|
||||||
self.update = Util.throttle(Config.options.ui.throttle, self.update)
|
self.update = Util.throttle(Config.options.ui.throttle, self.update)
|
||||||
|
|
||||||
self:on("User LazyRender", function()
|
self:on({ "User LazyRender", "User LazyFloatResized" }, function()
|
||||||
if not (self.buf and vim.api.nvim_buf_is_valid(self.buf)) then
|
if not (self.buf and vim.api.nvim_buf_is_valid(self.buf)) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue