diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-05 22:44:41 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-05 22:44:41 +1200 |
commit | 83943047b4302a88e6bdfb53bb42246f0a27d53d (patch) | |
tree | 9bb6e4d45be6b3ee745bd1052422601cbfd48e6e | |
parent | Merge branch 'hotfix/v0.1.1' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-cursorline-current-83943047b4302a88e6bdfb53bb42246f0a27d53d.tar.gz vim-cursorline-current-83943047b4302a88e6bdfb53bb42246f0a27d53d.zip |
Merge branch 'release/v0.2.0'v0.2.0
* release/v0.2.0:
Bump VERSION
Update documentation on events
Add FocusLost/FocusGained hooks
-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 |