aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-05 22:44:41 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-05 22:44:41 +1200
commit83943047b4302a88e6bdfb53bb42246f0a27d53d (patch)
tree9bb6e4d45be6b3ee745bd1052422601cbfd48e6e
parentMerge branch 'hotfix/v0.1.1' (diff)
parentBump VERSION (diff)
downloadvim-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--VERSION2
-rw-r--r--doc/cursorline_current.txt5
-rw-r--r--plugin/cursorline_current.vim6
3 files changed, 7 insertions, 6 deletions
diff --git a/VERSION b/VERSION
index 17e51c3..0ea3a94 100644
--- a/VERSION
+++ b/VERSION
@@ -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