mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +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:
@@ -99,6 +99,10 @@ function! s:airline_toggle()
|
||||
" Make sure that g_airline_gui_mode is refreshed
|
||||
autocmd OptionSet termguicolors call <sid>on_colorscheme_changed()
|
||||
endif
|
||||
if exists("##TerminalOpen")
|
||||
" Make sure that g_airline_gui_mode is refreshed
|
||||
autocmd TerminalOpen * call <sid>on_colorscheme_changed()
|
||||
endif
|
||||
" Refresh airline for :syntax off
|
||||
autocmd SourcePre */syntax/syntax.vim
|
||||
\ call airline#extensions#tabline#buffers#invalidate()
|
||||
|
||||
Reference in New Issue
Block a user