detect whether quickfix or location list is open.

This commit is contained in:
Bailey Ling
2013-10-21 13:22:07 -04:00
parent 592cc412cf
commit dd2be8ac8d
3 changed files with 52 additions and 6 deletions

View File

@@ -63,12 +63,7 @@ function! airline#extensions#apply(...)
return -1
endif
if &buftype == 'quickfix'
let w:airline_section_a = '%q'
let w:airline_section_b = '%{get(w:, "quickfix_title", "")}'
let w:airline_section_c = ''
let w:airline_section_x = ''
elseif &buftype == 'help'
if &buftype == 'help'
call airline#extensions#apply_left_override('Help', '%f')
let w:airline_section_x = ''
let w:airline_section_y = ''
@@ -127,6 +122,8 @@ function! airline#extensions#load()
" non-trivial number of external plugins use eventignore=all, so we need to account for that
autocmd CursorMoved * call <sid>sync_active_winnr()
call airline#extensions#quickfix#init(s:ext)
if get(g:, 'loaded_unite', 0)
call airline#extensions#unite#init(s:ext)
endif