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

Fix closing preview when leaving quickfix #31

Closed
wants to merge 1 commit into from

Conversation

bengolds
Copy link
Contributor

This should fix #22; previously, the preview was closed on the BufDelete event. However, as far as I can tell that isn't called on closing the quick fix window in Neovim or Vim 9.0. Instead, the WinClosed event works well for this.

@@ -265,7 +265,7 @@ endfunction
augroup QuickrPreviewQfAutoCmds
autocmd! * <buffer>
" Auto close preview window when closing/deleting the qf/loc list
autocmd BufDelete <buffer> silent! pclose
autocmd WinClosed <buffer> silent! pclose
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a version check to make sure BufDelete is called for the older versions? We don't want to break it for older versions.

@bengolds bengolds closed this Dec 16, 2024
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.

Auto Close Preview on Quickfix List Close
2 participants