Merge pull request #1805 from doronbehar/exteralize-quickfix-type-func

Externalize quickfix function returning text
This commit is contained in:
Christian Brabandt 2018-10-02 20:17:56 +02:00 committed by GitHub
commit 13993d120e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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