mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-13 05:43:53 -05:00
Minimise sign place/unplace calls to speed things up.
Profiling shows that `:sign place` and `:sign unplace` are slow despite being native vimscript functions. This commit minimises the number of such calls by only updating signs that have changed.
This commit is contained in:
@@ -64,9 +64,7 @@ function! GitGutter(file, ...)
|
||||
call sign#remove_dummy_sign()
|
||||
endif
|
||||
endif
|
||||
call sign#clear_signs(a:file)
|
||||
call sign#find_other_signs(a:file)
|
||||
call sign#show_signs(a:file, modified_lines)
|
||||
call sign#update_signs(a:file, modified_lines)
|
||||
else
|
||||
call hunk#reset()
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user