aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-12 23:49:50 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-12 23:49:50 +1200
commit96736d49208272ee9cd9f562ef97551cd3c2271c (patch)
treefb644b971ecce99d0405d1524da420a3561ae6f9
parentMerge branch 'release/v2.1.0' into develop (diff)
parentBump VERSION (diff)
downloadvim-strip-trailing-whitespace-96736d49208272ee9cd9f562ef97551cd3c2271c.tar.gz
vim-strip-trailing-whitespace-96736d49208272ee9cd9f562ef97551cd3c2271c.zip
Merge branch 'hotfix/v2.1.1' into develop
* hotfix/v2.1.1: Bump VERSION Use less worrisome name for a variable
-rw-r--r--VERSION2
-rw-r--r--plugin/strip_trailing_whitespace.vim12
2 files changed, 7 insertions, 7 deletions
diff --git a/VERSION b/VERSION
index 7ec1d6d..3e3c2f1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.0
+2.1.1
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