add neoterm support

it shows neoterm_id on a inactive neoterm window
This commit is contained in:
Liu, Joey 2019-08-02 13:23:42 -04:00
parent c213f2ac44
commit 67a97c1ea0
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,10 @@ function! airline#extensions#term#inactive_apply(...)
let spc = g:airline_symbols.space let spc = g:airline_symbols.space
call a:1.add_section('airline_a', spc.'TERMINAL'.spc) call a:1.add_section('airline_a', spc.'TERMINAL'.spc)
call a:1.add_section('airline_b', spc.'%f') call a:1.add_section('airline_b', spc.'%f')
let neoterm_id = getbufvar(a:2.bufnr, 'neoterm_id')
if neoterm_id != ''
call a:1.add_section('airline_c', spc.'neoterm_'.neoterm_id.spc)
endif
return 1 return 1
endif endif
endfunction endfunction