aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-30 21:26:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-30 21:26:49 +1200
commit0b809e129cd2266ad787bb8d3a1b06962757b6a6 (patch)
tree8e1d5be76e6305318c77bd384833227810c99fc8
parentUse much shorter implementation for Load() (diff)
downloadvim-cursorline-current-0b809e129cd2266ad787bb8d3a1b06962757b6a6.tar.gz
vim-cursorline-current-0b809e129cd2266ad787bb8d3a1b06962757b6a6.zip
Restore BufEnter hook
The bug still shows up. Opening a window a second time onto an existing buffer doesn't restore the cursorline.
-rw-r--r--plugin/cursorline_current.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/cursorline_current.vim b/plugin/cursorline_current.vim
index c8de8ef..a7704e7 100644
--- a/plugin/cursorline_current.vim
+++ b/plugin/cursorline_current.vim
@@ -15,6 +15,8 @@ augroup cursorline_current
autocmd!
autocmd VimEnter *
\ if winnr('$') > 1 | call cursorline_current#Load() | endif
+ autocmd BufEnter *
+ \ if winnr('$') > 1 | call cursorline_current#Restore() | endif
autocmd InsertLeave,WinEnter,FocusGained *
\ call cursorline_current#Restore()
autocmd InsertEnter,WinLeave,FocusLost *