Skip to content

Commit

Permalink
feat(ui): re-render after resize. Fixes #174
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 26, 2022
1 parent 1d3da27 commit 9a2ecc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/lazy/view/float.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lua/lazy/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a2ecc8

Please sign in to comment.