aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-05 22:38:08 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-05 22:38:08 +1200
commitd80f1610c941143f38743be216d1213670ff8981 (patch)
tree56f7fd10e202aa08806bbc736ae55bc6f1c2ebda /plugin
parentMerge branch 'hotfix/v0.1.1' into develop (diff)
downloadvim-cursorline-current-d80f1610c941143f38743be216d1213670ff8981.tar.gz
vim-cursorline-current-d80f1610c941143f38743be216d1213670ff8981.zip
Add FocusLost/FocusGained hooks
Diffstat (limited to 'plugin')
-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