diff --git a/autoload/airline/extensions/term.vim b/autoload/airline/extensions/term.vim index b4d1d1bd..5e562e2e 100644 --- a/autoload/airline/extensions/term.vim +++ b/autoload/airline/extensions/term.vim @@ -7,9 +7,10 @@ function! airline#extensions#term#apply(...) if &buftype == 'terminal' let spc = g:airline_symbols.space - call a:1.add_section('airline_a', spc.'TERMINAL'.spc) + let name=get(g:airline_mode_map, 't', 't') + call a:1.add_section('airline_a', spc.name.spc) call a:1.add_section('airline_b', '') - call a:1.add_section('airline_c', spc.'%f') + call a:1.add_section('airline_term', spc.'%f') call a:1.split() call a:1.add_section('airline_y', '') call a:1.add_section('airline_z', spc.airline#section#create_right(['linenr', 'maxlinenr'])) diff --git a/autoload/airline/themes.vim b/autoload/airline/themes.vim index f6dd10f5..5379c028 100644 --- a/autoload/airline/themes.vim +++ b/autoload/airline/themes.vim @@ -45,8 +45,7 @@ function! airline#themes#patch(palette) let a:palette[mode]['airline_error'] = [ '#000000', '#990000', 232, 160 ] endif if !has_key(a:palette[mode], 'airline_term') - "let a:palette[mode]['airline_term'] = [ '#9cffd3', '#202020', 85, 232] - let a:palette[mode]['airline_term'] = airline#highlighter#get_highlight('airline_c') + let a:palette[mode]['airline_term'] = [ '#9cffd3', '#202020', 85, 232] endif endfor diff --git a/doc/airline.txt b/doc/airline.txt index 1531046c..ec3f37e4 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -184,6 +184,7 @@ values): \ 's' : 'S', \ 'S' : 'S', \ '' : 'S', + \ 't' : 'T', \ } < * define the set of filename match queries which excludes a window from having diff --git a/plugin/airline.vim b/plugin/airline.vim index 34870c43..20efa26f 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -99,6 +99,10 @@ function! s:airline_toggle() " Make sure that g_airline_gui_mode is refreshed autocmd OptionSet termguicolors call on_colorscheme_changed() endif + if exists("##TerminalOpen") + " Make sure that g_airline_gui_mode is refreshed + autocmd TerminalOpen * call on_colorscheme_changed() + endif " Refresh airline for :syntax off autocmd SourcePre */syntax/syntax.vim \ call airline#extensions#tabline#buffers#invalidate()