aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-09 11:46:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-09 11:46:59 +1200
commit40213bb20280045558068bb8287cb672717b2214 (patch)
tree192aceb79e94621a8fe4053e8361fc9d304cbf66
parentSwitch to two-spacing (diff)
downloadvim-cursorline-current-40213bb20280045558068bb8287cb672717b2214.tar.gz
vim-cursorline-current-40213bb20280045558068bb8287cb672717b2214.zip
Remove unneeded variable scoping
-rw-r--r--plugin/cursorline_current.vim14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugin/cursorline_current.vim b/plugin/cursorline_current.vim
index 9977f95..b0c38b4 100644
--- a/plugin/cursorline_current.vim
+++ b/plugin/cursorline_current.vim
@@ -6,13 +6,13 @@
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
-if exists('g:loaded_cursorline_current') || &compatible
+if exists('loaded_cursorline_current') || &compatible
finish
endif
if !has('autocmd') || !has('windows') || v:version < 700
finish
endif
-let g:loaded_cursorline_current = 1
+let loaded_cursorline_current = 1
" Suspend 'cursorline' when a window is inactive or inserting
function! s:Suspend() abort
@@ -30,19 +30,19 @@ endfunction
function! s:Load() abort
" Cache current window index
- let l:wcur = winnr()
+ let wcur = winnr()
" Iterate through all the windows and suspend all but the current one
- for l:wnum in range(1, winnr('$'))
- if l:wnum == l:wcur
+ for wnum in range(1, winnr('$'))
+ if wnum == wcur
continue
endif
- execute l:wnum . 'wincmd w'
+ execute wnum . 'wincmd w'
call s:Suspend()
endfor
" Return to the window in which we started
- execute l:wcur . 'wincmd w'
+ execute wcur . 'wincmd w'
endfunction