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:
Andy Stewart
2014-01-06 16:58:45 +01:00
parent 65b050ba2e
commit faa6aaf669
2 changed files with 97 additions and 57 deletions

View File

@@ -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