aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/cursorline_current.vim6
1 files changed, 3 insertions, 3 deletions
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