From 7efa5067efa0cc90c7cd0e47be6cf7ce88a9d7f0 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 7 Feb 2016 21:10:37 +0100 Subject: [PATCH] fix performance regression --- autoload/airline.vim | 4 +--- plugin/airline.vim | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index fc323f4d..83b7dfa2 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -179,12 +179,10 @@ function! airline#check_mode(winnr) endif let mode_string = join(l:mode) - if get(w:, 'airline_lastmode', '') != mode_string || - \ get(s:, 'airline_lastmode', []) != l:mode + if get(w:, 'airline_lastmode', '') != mode_string call airline#highlighter#highlight_modified_inactive(context.bufnr) call airline#highlighter#highlight(l:mode) let w:airline_lastmode = mode_string - let s:airline_lastmode = l:mode endif return '' diff --git a/plugin/airline.vim b/plugin/airline.vim index 32ddcbf9..fc8e975b 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -82,6 +82,7 @@ function! s:airline_toggle() autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload,VimResized * \ call on_window_changed() + autocmd TabEnter * :unlet! w:airline_lastmode autocmd BufWritePost */autoload/airline/themes/*.vim \ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0] \ | call airline#load_theme()