Extend denite statusline to denite-filter buffer

Closes https://github.com/vim-airline/vim-airline/issues/1920
This commit is contained in:
petobens 2019-05-22 10:33:03 -03:00
parent 7b20361baf
commit f07889c266

View File

@ -12,7 +12,7 @@ let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3)
" that implements its own insert/normal mode so we have to handle changing the " that implements its own insert/normal mode so we have to handle changing the
" highlight " highlight
function! airline#extensions#denite#check_denite_mode(bufnr) function! airline#extensions#denite#check_denite_mode(bufnr)
if &filetype != 'denite' if &filetype !=# 'denite' || &filetype !=# 'denite-filter'
return '' return ''
endif endif
@ -30,7 +30,7 @@ function! airline#extensions#denite#check_denite_mode(bufnr)
endfunction endfunction
function! airline#extensions#denite#apply(...) function! airline#extensions#denite#apply(...)
if &ft == 'denite' if &filetype ==# 'denite' || &filetype ==# 'denite-filter'
let w:airline_skip_empty_sections = 0 let w:airline_skip_empty_sections = 0
call a:1.add_section('airline_a', ' Denite %{airline#extensions#denite#check_denite_mode('.a:2['bufnr'].')}') call a:1.add_section('airline_a', ' Denite %{airline#extensions#denite#check_denite_mode('.a:2['bufnr'].')}')
if s:denite_ver == 3 if s:denite_ver == 3