From 40213bb20280045558068bb8287cb672717b2214 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 11:46:45 +1200 Subject: Remove unneeded variable scoping --- plugin/cursorline_current.vim | 14 +++++++------- 1 file 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 " 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 -- cgit v1.2.3