Skip to content

Commit

Permalink
fixup! Improve handling of disabled buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
mhinz committed Nov 20, 2019
1 parent 8de3e84 commit 4b041ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions autoload/sy.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ function! sy#stop(...) abort
let bufnr = bufnr('')
if empty(getbufvar(a:0 ? a:1 : bufnr, 'sy')) | return | endif
call sy#sign#remove_all_signs(bufnr)
" TODO: Can't unset autocmds in another buffer.
autocmd! signify * <buffer>
execute printf('autocmd! signify * <buffer=%d>', bufnr)
call setbufvar(bufnr, 'sy', {})
endfunction

Expand Down Expand Up @@ -102,7 +101,7 @@ endfunction
" #set_autocmds {{{1
function! sy#set_autocmds() abort
augroup signify
autocmd!
autocmd! * <buffer>

autocmd BufEnter <buffer> call sy#start()
autocmd WinEnter <buffer> call sy#start()
Expand Down

0 comments on commit 4b041ce

Please sign in to comment.