mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-05-18 14:29:42 +08:00
terminal: Some improvements to Terminal detection
closes #1730 - Make sure to always call the term extension on TermOpen autocommands - consistently use the airline_term highlighting group - hard code the airline_term highlighting group, because by the time the function airline#themes#patch() is called the highlighting group airline_c would no be defined, so we cannot dynamically get those attributes - In the documentation, mention how the g:airline_mode_map can be set including the terminal section
This commit is contained in:
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user