Merge pull request #2099 from kazukazuinaina/fix_denite_extension
[fix] operator and [add] abort in autoload function
This commit is contained in:
commit
8a7172e1c2
|
@ -12,8 +12,8 @@ let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3)
|
||||||
" Denite does not use vim's built-in modal editing but has a custom prompt
|
" Denite does not use vim's built-in modal editing but has a custom prompt
|
||||||
" 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) abort
|
||||||
if &filetype !=# 'denite' || &filetype !=# 'denite-filter'
|
if &filetype !=# 'denite' && &filetype !=# 'denite-filter'
|
||||||
return ''
|
return ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ function! airline#extensions#denite#check_denite_mode(bufnr)
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#denite#apply(...)
|
function! airline#extensions#denite#apply(...) abort
|
||||||
if &filetype ==# 'denite' || &filetype ==# 'denite-filter'
|
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'].')}')
|
||||||
|
@ -49,7 +49,7 @@ function! airline#extensions#denite#apply(...)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#denite#init(ext)
|
function! airline#extensions#denite#init(ext) abort
|
||||||
call denite#custom#option('_', 'statusline', 0)
|
call denite#custom#option('_', 'statusline', 0)
|
||||||
call a:ext.add_statusline_func('airline#extensions#denite#apply')
|
call a:ext.add_statusline_func('airline#extensions#denite#apply')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in New Issue