From bd4cb97e85d00fc4880f289c431d0c896089f035 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 13 May 2016 10:06:11 +0200 Subject: [PATCH] Add quickfix title to inactive statusline fixes #1162 --- autoload/airline/extensions/quickfix.vim | 7 +++++++ 1 file changed, 7 insertions(+) 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()