From d9acbc53b028d9245cc349cac5581d37bc147ba9 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 12 Apr 2018 10:23:49 +0200 Subject: [PATCH] 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. --- plugin/airline.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/airline.vim b/plugin/airline.vim index 16352530..34870c43 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -95,6 +95,10 @@ function! s:airline_toggle() autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter') autocmd GUIEnter,ColorScheme * call on_colorscheme_changed() + if exists("##OptionSet") + " Make sure that g_airline_gui_mode is refreshed + autocmd OptionSet termguicolors call on_colorscheme_changed() + endif " Refresh airline for :syntax off autocmd SourcePre */syntax/syntax.vim \ call airline#extensions#tabline#buffers#invalidate()