From f6f425e4cfdc0e22d895129c6fcdb1770d4994f9 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 16 Aug 2019 11:55:01 +0100 Subject: [PATCH] Do not use a dummy sign to prevent sign column flicker. In fe2b4ec8692b79a99ef6c9cbdda6e39813b529b7 (from 2013) the plugin started using a dummy sign to prevent the sign column briefly disappearing then reappearing when updating signs. Since then Vim has vastly improved its handling of signs and the sign column no longer flickers like this. --- autoload/gitgutter/sign.vim | 9 --------- 1 file changed, 9 deletions(-) diff --git a/autoload/gitgutter/sign.vim b/autoload/gitgutter/sign.vim index 80d21eb..8d06dbe 100644 --- a/autoload/gitgutter/sign.vim +++ b/autoload/gitgutter/sign.vim @@ -60,17 +60,8 @@ function! gitgutter#sign#update_signs(bufnr, modified_lines) abort let new_gitgutter_signs_line_numbers = map(copy(a:modified_lines), 'v:val[0]') let obsolete_signs = s:obsolete_gitgutter_signs_to_remove(a:bufnr, new_gitgutter_signs_line_numbers) - let flicker_possible = s:remove_all_old_signs && !empty(a:modified_lines) - if flicker_possible - call s:add_dummy_sign(a:bufnr) - endif - call s:remove_signs(a:bufnr, obsolete_signs, s:remove_all_old_signs) call s:upsert_new_gitgutter_signs(a:bufnr, a:modified_lines) - - if flicker_possible - call gitgutter#sign#remove_dummy_sign(a:bufnr, 0) - endif endfunction