Skip to content
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

Focus parent before closing #259

Merged
merged 1 commit into from
Feb 16, 2023
Merged

Focus parent before closing #259

merged 1 commit into from
Feb 16, 2023

Conversation

brianreumere
Copy link
Contributor

@brianreumere brianreumere commented Feb 15, 2023

I believe this should fix #240, #59, #209, and #189. It simply focuses self.parent before calling nvim_win_close() in the View:close() function. As far as I can tell, this function is only called when the Trouble window/list is closed (with q or :TroubleToggle or :TroubleClose).

I think this should be less likely to cause issues than the change in #72 that was reverted. That change modified View:close_preview(), which is called every time the BufLeave autocmd is triggered, which (in addition to when closing the Trouble window) happens every time you select a diagnostic item in the Trouble window with Return.

@folke folke merged commit 66b057b into folke:main Feb 16, 2023
@folke
Copy link
Owner

folke commented Feb 16, 2023

thank you!

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.

Closing Trouble does not refocus last window.
2 participants