diff options
Diffstat (limited to 'vim/plugin')
-rw-r--r-- | vim/plugin/strip_trailing_whitespace.vim | 4 | ||||
-rw-r--r-- | vim/plugin/toggle_option_flag.vim | 4 |
2 files changed, 4 insertions, 4 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 diff --git a/vim/plugin/toggle_option_flag.vim b/vim/plugin/toggle_option_flag.vim index cbe8035e..b63e0eb8 100644 --- a/vim/plugin/toggle_option_flag.vim +++ b/vim/plugin/toggle_option_flag.vim @@ -18,13 +18,13 @@ let g:loaded_toggle_option_flag = 1 function! s:Toggle(option, flag, local) " Check for weird options, we don't want to :execute anything funny - if a:option =~# '[^a-z]' + if a:option =~# '\m[^a-z]' echoerr 'Illegal option name' return endif " Weird flags, too; should be a single inoffensive char - if a:flag !~# '^[a-z0-9.]$' + if a:flag !~# '\m^[a-z0-9.]$' echoerr 'Illegal flag' return endif |