From 2ea929bd90ebbd589bf24255ce520d796f8e03f0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 6 Nov 2017 20:09:17 +1300 Subject: Use v:count1 directly in function There's no particular reason to pass it in. --- plugin/nextag.vim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugin/nextag.vim b/plugin/nextag.vim index eb543c6..97f220f 100644 --- a/plugin/nextag.vim +++ b/plugin/nextag.vim @@ -20,12 +20,12 @@ let g:loaded_nextag = 1 " " Search for a SGML tag with the specified flag. " -function! s:MoveToSGMLTag(direction, mode, count) +function! s:MoveToSGMLTag(direction, mode) if a:mode ==# 'v' normal! gv endif let l:visualfix = a:mode ==# 'v' && a:direction ==# 'next' && &selection !=# 'exclusive' ? 1 : 0 - for l:iteration in range(1, a:count) + for l:iteration in range(1, v:count1) call search('\m<\/\?\w\+[^>]*>', a:direction ==# 'next' ? 'W' : 'Wb') if l:visualfix normal! l @@ -41,19 +41,19 @@ endfunction " nnoremap \ . - \ :call MoveToSGMLTag('next', 'n', v:count1) + \ :call MoveToSGMLTag('next', 'n') nnoremap \ , - \ :call MoveToSGMLTag('prev', 'n', v:count1) + \ :call MoveToSGMLTag('prev', 'n') onoremap \ . - \ :call MoveToSGMLTag('next', 'o', v:count1) + \ :call MoveToSGMLTag('next', 'o') onoremap \ , - \ :call MoveToSGMLTag('prev', 'o', v:count1) + \ :call MoveToSGMLTag('prev', 'o') vnoremap \ . - \ :call MoveToSGMLTag('next', 'v', v:count1) + \ :call MoveToSGMLTag('next', 'v') vnoremap \ , - \ :call MoveToSGMLTag('prev', 'v', v:count1) + \ :call MoveToSGMLTag('prev', 'v') -- cgit v1.2.3