diff --git a/autoload/sy/util.vim b/autoload/sy/util.vim index 0501e8d..9f100d8 100644 --- a/autoload/sy/util.vim +++ b/autoload/sy/util.vim @@ -30,7 +30,9 @@ function! sy#util#refresh_windows() abort let winnr = winnr() endif - windo if exists('b:sy') | call sy#start() | endif + if !get(g:, 'signify_cmdwin_active') + windo if exists('b:sy') | call sy#start() | endif + endif if exists('winid') call win_gotoid(winid) diff --git a/doc/signify.txt b/doc/signify.txt index 955fea9..8256958 100644 --- a/doc/signify.txt +++ b/doc/signify.txt @@ -291,9 +291,12 @@ NOTE: This also saves the buffer to disk! *g:signify_update_on_focusgained* > let g:signify_update_on_focusgained = 0 < -Update signs when the window holding Vim gains focus. +Update the signs on |FocusGained|, thus when the window holding Vim gains focus. +It does so by executing |signify-:SignifyRefresh|. -NOTE: This works for all GUIs and even a few terminal emulators. +NOTE: The |FocusGained| event is fired for all GUIs and even a few terminal +emulators. If you use tmux, put `set-option -g focus-events on` in your +tmux.conf. ------------------------------------------------------------------------------ *g:signify_line_highlight* > @@ -421,6 +424,8 @@ Toggle line highlighting for lines containing changes. < Refresh signs in all windows. +NOTE: Nothing will happen, if :SignifyRefresh is used from the |cmdline-window|. + ------------------------------------------------------------------------------ *signify-:SignifyFold* > :SignifyFold[!] diff --git a/plugin/signify.vim b/plugin/signify.vim index 51a4120..f3cc5da 100644 --- a/plugin/signify.vim +++ b/plugin/signify.vim @@ -18,6 +18,9 @@ augroup signify autocmd QuickFixCmdPre *vimgrep* let g:signify_locked = 1 autocmd QuickFixCmdPost *vimgrep* let g:signify_locked = 0 + autocmd CmdwinEnter * let g:signify_cmdwin_active = 1 + autocmd CmdwinLeave * let g:signify_cmdwin_active = 0 + autocmd BufWritePost * call sy#start() if get(g:, 'signify_realtime') && has('patch-7.4.1967')