mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 20:34:48 +08:00
Merge pull request #1008 from chrisbra/performance_regression
fix performance regression
This commit is contained in:
commit
e7de5f451a
|
@ -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 ''
|
||||
|
|
|
@ -82,6 +82,7 @@ function! s:airline_toggle()
|
|||
autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload,VimResized *
|
||||
\ call <sid>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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user