diff --git a/autoload/sy.vim b/autoload/sy.vim index 756397d..1d7004e 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -18,6 +18,10 @@ sign define SignifyPlaceholder text=. texthl=SignifySignChange linehl= " Function: #start {{{1 function! sy#start(path) abort + if g:signify_locked + return + endif + if &diff \ || !filereadable(a:path) \ || (exists('g:signify_skip_filetype') && has_key(g:signify_skip_filetype, &ft)) diff --git a/plugin/signify.vim b/plugin/signify.vim index a0d13e3..4e89458 100644 --- a/plugin/signify.vim +++ b/plugin/signify.vim @@ -5,7 +5,9 @@ scriptencoding utf-8 if exists('g:loaded_signify') || !has('signs') || &cp finish endif + let g:loaded_signify = 1 +let g:signify_locked = 0 " Init: autocmds {{{1 augroup signify @@ -16,6 +18,9 @@ augroup signify autocmd BufRead,BufWritePost * call sy#start(b:sy_path) autocmd BufDelete * call sy#stop(expand('')) + autocmd QuickFixCmdPre *vimgrep* let g:signify_locked = 1 + autocmd QuickFixCmdPost *vimgrep* let g:signify_locked = 0 + if get(g:, 'signify_update_on_bufenter') autocmd BufEnter * nested \ if exists('b:sy') && b:sy.active && &modified |