diff --git a/autoload/airline.vim b/autoload/airline.vim index 23d7fc7..d54fe03 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -143,6 +143,11 @@ 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) @@ -185,6 +190,13 @@ 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)