From 9a2ecc875003a4cbcfba2eeaea0fbd794d270449 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 26 Dec 2022 14:19:33 +0100 Subject: [PATCH] feat(ui): re-render after resize. Fixes #174 --- lua/lazy/view/float.lua | 1 + lua/lazy/view/init.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/view/float.lua b/lua/lazy/view/float.lua index 3dfec98..0675fd0 100644 --- a/lua/lazy/view/float.lua +++ b/lua/lazy/view/float.lua @@ -119,6 +119,7 @@ function M:mount() config[key] = self.opts.win_opts[key] end vim.api.nvim_win_set_config(self.win, config) + vim.cmd([[do User LazyFloatResized]]) end, }) end diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index 8cf6ec6..e058674 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -55,7 +55,7 @@ function M.create() self.render = Render.new(self) 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 return true end