aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-12 23:48:30 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-12 23:48:30 +1200
commit0a1c3520f381ed85fa2aa5e455f4d05010300efe (patch)
treef04680c974b4e60857c9fbc75ef42279b0154853
parentMerge branch 'release/v2.1.0' (diff)
downloadvim-strip-trailing-whitespace-0a1c3520f381ed85fa2aa5e455f4d05010300efe.tar.gz
vim-strip-trailing-whitespace-0a1c3520f381ed85fa2aa5e455f4d05010300efe.zip
Use less worrisome name for a variable
This appeases vint.
-rw-r--r--plugin/strip_trailing_whitespace.vim12
1 files 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