aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-30 21:12:29 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-30 21:12:29 +1200
commit0e0d38deb5a5b6066db0343a7690584e61288d49 (patch)
treef002b269bc73857512fb4b38a92bf7999b0af848
parentPare down variable names and usage (diff)
downloadvim-cursorline-current-0e0d38deb5a5b6066db0343a7690584e61288d49.tar.gz
vim-cursorline-current-0e0d38deb5a5b6066db0343a7690584e61288d49.zip
Run load and restore functions only with multiwin
-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