Merge pull request #1165 from chrisbra/1162

Add quickfix title to inactive statusline
This commit is contained in:
Christian Brabandt 2016-05-13 20:41:51 +02:00
commit ba94fa12b9
1 changed files with 7 additions and 0 deletions

View File

@ -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()