From d80f1610c941143f38743be216d1213670ff8981 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 5 Aug 2018 22:38:08 +1200 Subject: Add FocusLost/FocusGained hooks --- plugin/cursorline_current.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugin') diff --git a/plugin/cursorline_current.vim b/plugin/cursorline_current.vim index 8a8ea91..828c581 100644 --- a/plugin/cursorline_current.vim +++ b/plugin/cursorline_current.vim @@ -62,9 +62,9 @@ augroup cursorline_current " Turn off 'cursorline' for other windows on load autocmd VimEnter * call s:Load() - " Turn off 'cursorline' when leaving a window - autocmd WinLeave * call s:Suspend() - autocmd WinEnter * call s:Restore() + " Turn off 'cursorline' when leaving a window or losing focus + autocmd WinLeave,FocusLost * call s:Suspend() + autocmd WinEnter,FocusGained * call s:Restore() " Turn off 'cursorline' when in insert mode " Check g:cursorline_current_insert, in case the user doesn't want it -- cgit v1.2.3