Skip to content

Commit

Permalink
Don't set autocmds twice
Browse files Browse the repository at this point in the history
  • Loading branch information
mhinz committed Nov 26, 2019
1 parent d20015f commit f52e412
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions autoload/sy.vim
Expand Up @@ -116,10 +116,6 @@ endfunction

" #set_buflocal_autocmds {{{1
function! sy#set_buflocal_autocmds(bufnr) abort
if get(g:, 'signify_disable_by_default')
return
endif

augroup signify
execute printf('autocmd! * <buffer=%d>', a:bufnr)

Expand Down
5 changes: 4 additions & 1 deletion plugin/signify.vim
Expand Up @@ -68,7 +68,10 @@ endif
autocmd QuickFixCmdPre *vimgrep* let g:signify_locked = 1
autocmd QuickFixCmdPost *vimgrep* let g:signify_locked = 0

autocmd BufNewFile,BufRead * call sy#set_buflocal_autocmds(expand('<abuf>'))
autocmd BufNewFile,BufRead * nested
\ if !get(g:, 'signify_disable_by_default') |
\ call sy#start({'bufnr': bufnr('')}) |
\ endif
" 1}}}

if exists('#User#SignifySetup')
Expand Down

0 comments on commit f52e412

Please sign in to comment.