diff options
-rw-r--r-- | plugin/cursorline_current.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/cursorline_current.vim b/plugin/cursorline_current.vim index be560b5..43bf882 100644 --- a/plugin/cursorline_current.vim +++ b/plugin/cursorline_current.vim @@ -53,9 +53,11 @@ augroup cursorline_current " Turn off 'cursorline' for other windows on load autocmd VimEnter * call s:Load() - " Turn off 'cursorline' when leaving a window or losing focus + " Turn off 'cursorline' when leaving a window or losing focus. We call the + " restore again on BufEnter to handle existent local buffer values for the + " option overwriting the window value (Vim bug?) autocmd WinLeave,FocusLost * call s:Suspend() - autocmd WinEnter,FocusGained * call s:Restore() + autocmd BufEnter,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 |