Merge pull request #1321 from chrisbra/getwininfo
Use getwininfo() for checking quickfix window
This commit is contained in:
commit
781b4ea6a2
|
@ -27,6 +27,14 @@ function! airline#extensions#quickfix#inactive_qf_window(...)
|
|||
endfunction
|
||||
|
||||
function! s:get_text()
|
||||
if exists("*win_getid") && exists("*getwininfo")
|
||||
let dict = getwininfo(win_getid())
|
||||
if len(dict) > 0 && dict[0].quickfix && !dict[0].loclist
|
||||
return g:airline#extensions#quickfix#quickfix_text
|
||||
elseif len(dict) > 0 && dict[0].quickfix && dict[0].loclist
|
||||
return g:airline#extensions#quickfix#location_text
|
||||
endif
|
||||
endif
|
||||
redir => buffers
|
||||
silent ls
|
||||
redir END
|
||||
|
@ -43,4 +51,3 @@ function! s:get_text()
|
|||
endfor
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue