From 0a1c3520f381ed85fa2aa5e455f4d05010300efe Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 12 May 2019 23:48:30 +1200 Subject: Use less worrisome name for a variable This appeases vint. --- plugin/strip_trailing_whitespace.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/strip_trailing_whitespace.vim b/plugin/strip_trailing_whitespace.vim index 5fde8e3..f02f7a0 100644 --- a/plugin/strip_trailing_whitespace.vim +++ b/plugin/strip_trailing_whitespace.vim @@ -55,7 +55,7 @@ endfunction function s:StripHorizontal(start, end) abort " Start a count of lines trimmed - let count = 0 + let stripped = 0 " Iterate through buffer let num = a:start @@ -65,7 +65,7 @@ function s:StripHorizontal(start, end) abort let line = getline(num) if line =~# '\s\+$' call setline(num, substitute(line, '\s*$', '', '')) - let count = count + 1 + let stripped = stripped + 1 endif " Bump for next iteration @@ -74,7 +74,7 @@ function s:StripHorizontal(start, end) abort endwhile " Return the number of lines trimmed - return count + return stripped endfunction @@ -103,14 +103,14 @@ function s:StripVertical() abort " Get the number of lines to delete; if there are any, build a range and " remove them with :delete, suppressing its normal output (we'll do it) - let count = line('$') - eof - if count + let stripped = line('$') - eof + if stripped let range = (eof + 1).',$' silent execute range.'delete' endif " Return the number of lines deleted - return count + return stripped endfunction -- cgit v1.2.3