Skip to content

Commit

Permalink
fix(sidebar): invalid window number
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchanns committed Aug 22, 2024
1 parent 67c0be2 commit 4112eb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/avante/sidebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,11 @@ function Sidebar:on_mount()
api.nvim_create_autocmd("WinResized", {
group = self.augroup,
callback = function()
if not api.nvim_win_is_valid(self.input_container.winid) or not api.nvim_win_is_valid(self.input.winid) then
if
not self.input_container.winid
or not api.nvim_win_is_valid(self.input_container.winid)
or not api.nvim_win_is_valid(self.input.winid)
then
return
end

Expand Down

0 comments on commit 4112eb1

Please sign in to comment.