Skip to content

fix: don't throw errors when closing code window #2401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2025
Merged

Conversation

dtor
Copy link
Contributor

@dtor dtor commented Jul 3, 2025

Before using stored window ID in Sidebar:recover_code_winhl() we should check that it is valid, otherwise we may get the following error:

Error detected while processing WinClosed Autocommands for "*": Error executing lua callback: ...le/home/dtor/projects/avante.nvim/lua/avante/sidebar.lua:221: Invalid window id: 1008

This happens when closing code window while sidebar is open/visible.

Before using stored window ID in Sidebar:recover_code_winhl() we should
check that it is valid, otherwise we may get the following error:

Error detected while processing WinClosed Autocommands for "*":
Error executing lua callback: ...le/home/dtor/projects/avante.nvim/lua/avante/sidebar.lua:221: Invalid window id: 1008

This happens when closing code window while sidebar is open/visible.
@yetone yetone merged commit 8346d9b into yetone:main Jul 3, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants