aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-20 20:36:01 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-20 20:36:01 +1200
commit8b305ee50273a07ab1c9af9618308326ce818043 (patch)
tree878d4930f67c555f8599be6090ff2866074dee5a
parentMerge branch 'release/v2.0.0' (diff)
downloadvim-strip-trailing-whitespace-8b305ee50273a07ab1c9af9618308326ce818043.tar.gz
vim-strip-trailing-whitespace-8b305ee50273a07ab1c9af9618308326ce818043.zip
Handle ranges correctly
-rw-r--r--plugin/strip_trailing_whitespace.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/strip_trailing_whitespace.vim b/plugin/strip_trailing_whitespace.vim
index 75438d9..ed9ad66 100644
--- a/plugin/strip_trailing_whitespace.vim
+++ b/plugin/strip_trailing_whitespace.vim
@@ -52,8 +52,8 @@ function s:StripHorizontal(start, end) abort
let l:count = 0
" Iterate through buffer
- let l:num = 1
- while l:num <= line('$')
+ let l:num = a:start
+ while l:num <= a:end
" If the line has trailing whitespace, strip it off and bump the count
let l:line = getline(l:num)