From fbce1cb6892e3c43b83b95e4ead4f5495733ac23 Mon Sep 17 00:00:00 2001 From: Frank Erens Date: Thu, 26 Sep 2013 10:35:17 +0200 Subject: [PATCH] Update quickfix window when swtiching buffers. When switching between buffers, the quickfix window does not automatically update. This patch checks when a BufEnter event happens, and refreshes the quickfix window. --- plugin/clang_complete.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin/clang_complete.vim b/plugin/clang_complete.vim index 54f54635..0e731d33 100644 --- a/plugin/clang_complete.vim +++ b/plugin/clang_complete.vim @@ -8,6 +8,7 @@ " au FileType c,cpp,objc,objcpp call ClangCompleteInit() +au BufEnter * callClangCompleteBufEnter() let b:clang_parameters = '' let b:clang_user_options = '' @@ -17,6 +18,13 @@ let b:my_changedtick = 0 " not during a function call. let s:plugin_path = escape(expand(':p:h'), '\') +function! s:ClangCompleteBufEnter() + if &filetype == 'c' || &filetype == 'cpp' || + \ &filetype == 'objc' || &filetype == 'objcpp' + callClangQuickFix() + endif +endfunction + function! s:ClangCompleteInit() let l:bufname = bufname("%") if l:bufname == ''