From c4eec4c46cd19ef9774885152d15365b764644be Mon Sep 17 00:00:00 2001 From: Nick Jensen Date: Fri, 18 Aug 2023 13:02:21 +1200 Subject: [PATCH] Clear qf buffer autocmds before adding new ones --- after/ftplugin/qf.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/after/ftplugin/qf.vim b/after/ftplugin/qf.vim index 90e81a7..18edda8 100644 --- a/after/ftplugin/qf.vim +++ b/after/ftplugin/qf.vim @@ -146,6 +146,7 @@ command! -buffer ListLists call qf#namedlist#ListLists() command! -buffer -nargs=* -bang -complete=customlist,qf#namedlist#CompleteList RemoveList call qf#namedlist#RemoveList(expand("") == "!" ? 1 : 0, ) " quit Vim if the last window is a quickfix window +autocmd! qf * autocmd qf BufEnter nested if get(g:, 'qf_auto_quit', 1) | if winnr('$') < 2 | q | endif | endif autocmd qf BufWinEnter nested if get(g:, 'qf_auto_quit', 1) | call qf#filter#ReuseTitle() | endif