diff --git a/autoload/airline/extensions/quickfix.vim b/autoload/airline/extensions/quickfix.vim index 91f459f..2a37f8c 100644 --- a/autoload/airline/extensions/quickfix.vim +++ b/autoload/airline/extensions/quickfix.vim @@ -15,6 +15,13 @@ endfunction function! airline#extensions#quickfix#init(ext) call a:ext.add_statusline_func('airline#extensions#quickfix#apply') + call a:ext.add_inactive_statusline_func('airline#extensions#quickfix#inactive_qf_window') +endfunction + +function! airline#extensions#quickfix#inactive_qf_window(...) + if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(getwinvar(a:2.winnr, 'quickfix_title', '')) + call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') + endif endfunction function! s:get_text()