From 7190164451c8d8656c34178c4ad07bf3bbc2862f Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 28 Sep 2018 12:56:49 +0300 Subject: [PATCH] Externalize quickfix function returning text Useful when one wants to use this function for something else and to know if a QuickFix window is actually a Location list with qf as `&filetype`. --- autoload/airline/extensions/quickfix.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/quickfix.vim b/autoload/airline/extensions/quickfix.vim index 55504ea2..26803712 100644 --- a/autoload/airline/extensions/quickfix.vim +++ b/autoload/airline/extensions/quickfix.vim @@ -13,7 +13,7 @@ endif function! airline#extensions#quickfix#apply(...) if &buftype == 'quickfix' - let w:airline_section_a = s:get_text() + let w:airline_section_a = airline#extensions#quickfix#get_type() let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' let w:airline_section_c = '' let w:airline_section_x = '' @@ -31,7 +31,7 @@ function! airline#extensions#quickfix#inactive_qf_window(...) endif endfunction -function! s:get_text() +function! airline#extensions#quickfix#get_type() if exists("*win_getid") && exists("*getwininfo") let dict = getwininfo(win_getid()) if len(dict) > 0 && get(dict[0], 'quickfix', 0) && !get(dict[0], 'loclist', 0)