From 52ce64053462c96727f2457d7fb45f3483207de2 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 14 Nov 2017 23:35:34 +0100 Subject: [PATCH] startup: remove workaround for skipping redraw commit 7d082c03b2f4f16b31b9b54cb26bcfc added a workaround to skip a few redraws on startup so that the intro message is not shown anymore. However might cause problems, that some highlighting groups are not correctly set. Also recent Vims (8.0.1290 and so on) do not seem to suffer from the problem that an too early initializiation of airline causes a redraw which skips the intro message. Therefore, revert that commit. Fixes #1585 --- autoload/airline.vim | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 1179c2ba..ad9fcea3 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -143,11 +143,6 @@ function! airline#statusline(winnr) endfunction function! airline#check_mode(winnr) - if !exists("s:airline_run") - let s:airline_run = 0 - endif - let s:airline_run += 1 - let context = s:contexts[a:winnr] if get(w:, 'airline_active', 1) @@ -190,13 +185,6 @@ function! airline#check_mode(winnr) endif let mode_string = join(l:mode) - if s:airline_run < 3 - " skip this round. - " When this function is run too early after startup, - " it forces a redraw by vim which will remove the intro screen. - let w:airline_lastmode = mode_string - return '' - endif if get(w:, 'airline_lastmode', '') != mode_string call airline#highlighter#highlight_modified_inactive(context.bufnr) call airline#highlighter#highlight(l:mode, context.bufnr)