aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/cursorline_current.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugin/cursorline_current.vim b/plugin/cursorline_current.vim
index db777d1..ff2e7e5 100644
--- a/plugin/cursorline_current.vim
+++ b/plugin/cursorline_current.vim
@@ -13,10 +13,10 @@ let loaded_cursorline_current = 1
augroup cursorline_current
autocmd!
- autocmd VimEnter
- \ * call cursorline_current#Load()
- autocmd InsertEnter,WinLeave,FocusLost
- \ * call cursorline_current#Suspend()
- autocmd InsertLeave,WinEnter,FocusGained,BufEnter
- \ * call cursorline_current#Restore()
+ autocmd VimEnter *
+ \ if winnr('$') > 1 | call cursorline_current#Load() | endif
+ autocmd InsertLeave,WinEnter,FocusGained *
+ \ if winnr('$') > 1 | call cursorline_current#Restore() | endif
+ autocmd InsertEnter,WinLeave,FocusLost,BufEnter *
+ \ call cursorline_current#Suspend()
augroup END