Reset g_airline_gui_mode on setting termguicolors

fixes #1663, should make sure that the separators are correctly
displayed even when setting 'termguicolors' later than expected.
This commit is contained in:
Christian Brabandt 2018-04-12 10:23:49 +02:00
parent 0df2c9b12e
commit d9acbc53b0
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 4 additions and 0 deletions

View File

@ -95,6 +95,10 @@ function! s:airline_toggle()
autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter') autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter')
autocmd GUIEnter,ColorScheme * call <sid>on_colorscheme_changed() autocmd GUIEnter,ColorScheme * call <sid>on_colorscheme_changed()
if exists("##OptionSet")
" Make sure that g_airline_gui_mode is refreshed
autocmd OptionSet termguicolors call <sid>on_colorscheme_changed()
endif
" Refresh airline for :syntax off " Refresh airline for :syntax off
autocmd SourcePre */syntax/syntax.vim autocmd SourcePre */syntax/syntax.vim
\ call airline#extensions#tabline#buffers#invalidate() \ call airline#extensions#tabline#buffers#invalidate()