aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/strip_trailing_whitespace.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/plugin/strip_trailing_whitespace.vim')
-rw-r--r--vim/plugin/strip_trailing_whitespace.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/plugin/strip_trailing_whitespace.vim b/vim/plugin/strip_trailing_whitespace.vim
index 677e51c5..d5f5624a 100644
--- a/vim/plugin/strip_trailing_whitespace.vim
+++ b/vim/plugin/strip_trailing_whitespace.vim
@@ -30,11 +30,11 @@ function! s:StripTrailingWhitespace()
" Replace the line with a subsitution of its text stripping extraneous
" whitespace
- call setline(l:li, substitute(l:line, '\s\+$', '', 'g'))
+ call setline(l:li, substitute(l:line, '\m\C\s\+$', '', 'g'))
" If this line has any non-whitespace characters on it, update l:lw with
" its index
- if l:line =~# '\S'
+ if l:line =~# '\m\S'
let l:lw = l:li
endif