diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 11:40:20 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-06 11:45:33 +1300 |
commit | f9e95b30a6dedb5f09ef904ae5d1993cd2d6115a (patch) | |
tree | 7703988f50a95a7d0d938ccad7f015fd9c509a10 /vim/plugin/toggle_option_flag.vim | |
parent | Remove redundant has('eval') VimL test (diff) | |
download | dotfiles-f9e95b30a6dedb5f09ef904ae5d1993cd2d6115a.tar.gz dotfiles-f9e95b30a6dedb5f09ef904ae5d1993cd2d6115a.zip |
Restore some judicious \m\C hedging in Vim
These are technically not really needed, but this is more consistent
with good style recommendations in the Google VimScript style guide.
Diffstat (limited to 'vim/plugin/toggle_option_flag.vim')
-rw-r--r-- | vim/plugin/toggle_option_flag.vim | 4 |
1 files changed, 2 insertions, 2 deletions
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 |