diff options
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | doc/cursorline_current.txt | 5 | ||||
-rw-r--r-- | plugin/cursorline_current.vim | 6 |
3 files changed, 7 insertions, 6 deletions
@@ -1 +1 @@ -0.1.1 +0.2.0 diff --git a/doc/cursorline_current.txt b/doc/cursorline_current.txt index 33f645e..1a84ece 100644 --- a/doc/cursorline_current.txt +++ b/doc/cursorline_current.txt @@ -3,8 +3,9 @@ DESCRIPTION *cursorline_current* This plugin tweaks the behaviour of the 'cursorline' option to enable it only -in the current window and when not in insert mode. It essentially makes -'cursorline' follow the cursor in normal mode as much as possible. +in the current window, when not in insert mode, and (if supported) when Vim +has focus. It essentially makes 'cursorline' follow the cursor in normal mode +as much as possible. It uses the global value of 'cursorline' as its default, and should also correctly handle local values for windows. 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 |