Merge pull request #1008 from chrisbra/performance_regression

fix performance regression
This commit is contained in:
Christian Brabandt 2016-02-07 22:29:30 +01:00
commit e7de5f451a
2 changed files with 2 additions and 3 deletions

View File

@ -179,12 +179,10 @@ function! airline#check_mode(winnr)
endif endif
let mode_string = join(l:mode) let mode_string = join(l:mode)
if get(w:, 'airline_lastmode', '') != mode_string || if get(w:, 'airline_lastmode', '') != mode_string
\ get(s:, 'airline_lastmode', []) != l:mode
call airline#highlighter#highlight_modified_inactive(context.bufnr) call airline#highlighter#highlight_modified_inactive(context.bufnr)
call airline#highlighter#highlight(l:mode) call airline#highlighter#highlight(l:mode)
let w:airline_lastmode = mode_string let w:airline_lastmode = mode_string
let s:airline_lastmode = l:mode
endif endif
return '' return ''

View File

@ -82,6 +82,7 @@ function! s:airline_toggle()
autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload,VimResized * autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload,VimResized *
\ call <sid>on_window_changed() \ call <sid>on_window_changed()
autocmd TabEnter * :unlet! w:airline_lastmode
autocmd BufWritePost */autoload/airline/themes/*.vim autocmd BufWritePost */autoload/airline/themes/*.vim
\ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0] \ exec 'source '.split(globpath(&rtp, 'autoload/airline/themes/'.g:airline_theme.'.vim', 1), "\n")[0]
\ | call airline#load_theme() \ | call airline#load_theme()