aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-08 00:56:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-08 00:56:10 +1200
commitb299f9bc42521191903bc2b6226933d319f6c593 (patch)
tree5b1692f95151b2c755a231bdeab8d825f5f17f3b
parentMerge branch 'hotfix/v0.6.1' (diff)
downloadvim-strip-trailing-whitespace-b299f9bc42521191903bc2b6226933d319f6c593.tar.gz
vim-strip-trailing-whitespace-b299f9bc42521191903bc2b6226933d319f6c593.zip
Fix another edge case
-rw-r--r--plugin/strip_trailing_whitespace.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/strip_trailing_whitespace.vim b/plugin/strip_trailing_whitespace.vim
index 2714f36..f3e01c0 100644
--- a/plugin/strip_trailing_whitespace.vim
+++ b/plugin/strip_trailing_whitespace.vim
@@ -42,7 +42,7 @@ function! s:StripTrailingWhitespace()
" If this line has any non-whitespace characters on it, update our cutoff
" point using its index, and push the trimmed lines we've counted since
" the last non-whitespace line onto the trimmed total
- if l:line =~# '\S'
+ if l:line =~# '\S' || l:last == 1
let l:cutoff = l:li
let l:trimmed = l:trimmed + l:trimmed_buffer
let l:trimmed_buffer = 0