prevent column flickering during sign updating
This commit is contained in:
parent
f7745efc84
commit
335d5c92dd
@ -99,6 +99,8 @@ else
|
|||||||
sign define SignifyChangeDelete text=!_ texthl=SignifyChange linehl=none
|
sign define SignifyChangeDelete text=!_ texthl=SignifyChange linehl=none
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
sign define SignifyPlaceholder text=~ texthl=SignifyChange linehl=none
|
||||||
|
|
||||||
" Initial stuff {{{1
|
" Initial stuff {{{1
|
||||||
augroup signify
|
augroup signify
|
||||||
autocmd!
|
autocmd!
|
||||||
@ -154,6 +156,7 @@ function! s:start(path) abort
|
|||||||
call s:sign_remove_all(a:path)
|
call s:sign_remove_all(a:path)
|
||||||
let diff = s:repo_get_diff_{s:sy[a:path].type}(a:path)
|
let diff = s:repo_get_diff_{s:sy[a:path].type}(a:path)
|
||||||
if empty(diff)
|
if empty(diff)
|
||||||
|
sign unplace 99999
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let s:sy[a:path].id_top = s:id_top
|
let s:sy[a:path].id_top = s:id_top
|
||||||
@ -174,6 +177,7 @@ function! s:start(path) abort
|
|||||||
call s:repo_process_diff(a:path, diff)
|
call s:repo_process_diff(a:path, diff)
|
||||||
|
|
||||||
let s:sy[a:path].id_top = (s:id_top - 1)
|
let s:sy[a:path].id_top = (s:id_top - 1)
|
||||||
|
sign unplace 99999
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Functions -> s:stop() {{{2
|
" Functions -> s:stop() {{{2
|
||||||
@ -183,6 +187,7 @@ function! s:stop(path) abort
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call s:sign_remove_all(a:path)
|
call s:sign_remove_all(a:path)
|
||||||
|
sign unplace 99999
|
||||||
|
|
||||||
if (s:sy[a:path].active == 0)
|
if (s:sy[a:path].active == 0)
|
||||||
return
|
return
|
||||||
@ -224,6 +229,8 @@ endfunction
|
|||||||
|
|
||||||
" Functions -> s:sign_remove_all() {{{2
|
" Functions -> s:sign_remove_all() {{{2
|
||||||
function! s:sign_remove_all(path) abort
|
function! s:sign_remove_all(path) abort
|
||||||
|
exe 'sign place 99999 line=1 name=SignifyPlaceholder file='. a:path
|
||||||
|
|
||||||
for id in s:sy[a:path].ids
|
for id in s:sy[a:path].ids
|
||||||
exe 'sign unplace '. id
|
exe 'sign unplace '. id
|
||||||
endfor
|
endfor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user