Skip to content

Commit 4b041ce

Browse files
committed
fixup! Improve handling of disabled buffers
1 parent 8de3e84 commit 4b041ce

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

autoload/sy.vim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ function! sy#stop(...) abort
7171
let bufnr = bufnr('')
7272
if empty(getbufvar(a:0 ? a:1 : bufnr, 'sy')) | return | endif
7373
call sy#sign#remove_all_signs(bufnr)
74-
" TODO: Can't unset autocmds in another buffer.
75-
autocmd! signify * <buffer>
74+
execute printf('autocmd! signify * <buffer=%d>', bufnr)
7675
call setbufvar(bufnr, 'sy', {})
7776
endfunction
7877

@@ -102,7 +101,7 @@ endfunction
102101
" #set_autocmds {{{1
103102
function! sy#set_autocmds() abort
104103
augroup signify
105-
autocmd!
104+
autocmd! * <buffer>
106105

107106
autocmd BufEnter <buffer> call sy#start()
108107
autocmd WinEnter <buffer> call sy#start()

0 commit comments

Comments
 (0)