From 80576742815e5374f4d097229b3ff7ff6a9dc6a5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 4 Aug 2018 20:27:24 +1200 Subject: Remove conditionals for 'cursorline' hooks The version check for Vim 7 and the feature checks for +autocmd and +windows should be good enough. --- vim/plugin/cursorline_current.vim | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'vim') diff --git a/vim/plugin/cursorline_current.vim b/vim/plugin/cursorline_current.vim index d17fc769..1668b69a 100644 --- a/vim/plugin/cursorline_current.vim +++ b/vim/plugin/cursorline_current.vim @@ -56,23 +56,17 @@ endfunction " Set up hooks for toggling 'cursorline' augroup cursorline_current - autocmd! + autocmd! - " Turn off 'cursorline' for other windows on load - if exists('##VimEnter') - autocmd VimEnter * call s:Load() - endif + " Turn off 'cursorline' for other windows on load + autocmd VimEnter * call s:Load() - " Turn off 'cursorline' when leaving a window - if exists('##WinEnter') && exists('##WinLeave') - autocmd WinLeave * call s:Suspend() - autocmd WinEnter * call s:Restore() - endif + " Turn off 'cursorline' when leaving a window + autocmd WinLeave * call s:Suspend() + autocmd WinEnter * call s:Restore() - " Turn off 'cursorline' when in insert mode - if exists('##InsertEnter') && exists('##InsertLeave') - autocmd InsertEnter * call s:Suspend() - autocmd InsertLeave * call s:Restore() - endif + " Turn off 'cursorline' when in insert mode + autocmd InsertEnter * call s:Suspend() + autocmd InsertLeave * call s:Restore() augroup END -- cgit v1.2.3