Skip to content

fix(#3143): ensure open.no_window_picker respects window_picker.exclude #3144

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LucasMABF
Copy link

Description

This PR ensures that when using open.no_window_picker, the fallback window selection respects the window_picker.exclude configuration.
Previously, if no window picker was used, nvim-tree would open the file in the last active window, even if that window matched an excluded type (e.g., a terminal).
Now it sets the fallback window as the first available usable window, not excluded in the configuration, which can prevent undesired behavior.

Related Issue

Fixes #3143

Additional Notes

I removed the first_win_id function to avoid redundant calls to usable_win_ids. Happy to adjust if you'd like to keep it.

Let me know if there’s any other adjustment or further cleanup you’d like.
Appreciate your time and review!

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.

open.no_window_picker fallback window should respect window_picker.exclude settings
1 participant