whitespace: Only refresh on changes to buffer
Should prevent too many redraws of Vim
This commit is contained in:
parent
811360a095
commit
f86f1e8103
|
@ -156,8 +156,12 @@ function! airline#extensions#whitespace#init(...)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:ws_refresh()
|
function! s:ws_refresh()
|
||||||
|
if get(b:, 'airline_ws_changedtick', 0) == b:changedtick
|
||||||
|
return
|
||||||
|
endif
|
||||||
unlet! b:airline_whitespace_check
|
unlet! b:airline_whitespace_check
|
||||||
if get(g:, 'airline_skip_empty_sections', 0)
|
if get(g:, 'airline_skip_empty_sections', 0)
|
||||||
exe ':AirlineRefresh'
|
exe ':AirlineRefresh'
|
||||||
endif
|
endif
|
||||||
|
let b:airline_ws_changedtick = b:changedtick
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in New Issue