mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-26 10:13:42 +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
|
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 ''
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user