parent
f7dc63e819
commit
6ecab1b621
@ -96,7 +96,8 @@ endfunction
|
|||||||
|
|
||||||
" Function: #stop {{{1
|
" Function: #stop {{{1
|
||||||
function! sy#stop(bnum) abort
|
function! sy#stop(bnum) abort
|
||||||
if !exists('b:sy')
|
let bvars = getbufvar(a:bnum, '')
|
||||||
|
if empty(bvars) || !has_key(bvars, 'sy')
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -42,16 +42,18 @@ endfunction
|
|||||||
|
|
||||||
" Function: #remove_all {{{1
|
" Function: #remove_all {{{1
|
||||||
function! sy#sign#remove_all(bnum) abort
|
function! sy#sign#remove_all(bnum) abort
|
||||||
|
let sy = getbufvar(a:bnum, 'sy')
|
||||||
|
|
||||||
if g:signify_sign_overwrite
|
if g:signify_sign_overwrite
|
||||||
execute 'sign unplace * buffer='. b:sy.buffer
|
execute 'sign unplace * buffer='. sy.buffer
|
||||||
else
|
else
|
||||||
for hunk in b:sy.hunks
|
for hunk in sy.hunks
|
||||||
for id in hunk.ids
|
for id in hunk.ids
|
||||||
execute 'sign unplace' id
|
execute 'sign unplace' id
|
||||||
endfor
|
endfor
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:sy.hunks = []
|
let sy.hunks = []
|
||||||
let b:sy.stats = [0, 0, 0]
|
let sy.stats = [0, 0, 0]
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -14,7 +14,6 @@ augroup signify
|
|||||||
autocmd VimEnter * call sy#highlight#setup()
|
autocmd VimEnter * call sy#highlight#setup()
|
||||||
autocmd BufRead,BufEnter * let b:sy_path = resolve(expand('<afile>:p'))
|
autocmd BufRead,BufEnter * let b:sy_path = resolve(expand('<afile>:p'))
|
||||||
autocmd BufRead,BufWritePost * call sy#start(b:sy_path)
|
autocmd BufRead,BufWritePost * call sy#start(b:sy_path)
|
||||||
|
|
||||||
autocmd BufDelete * call sy#stop(expand('<abuf>'))
|
autocmd BufDelete * call sy#stop(expand('<abuf>'))
|
||||||
|
|
||||||
if get(g:, 'signify_update_on_bufenter')
|
if get(g:, 'signify_update_on_bufenter')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user