aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:42:14 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-06 11:46:18 +1300
commit9fbceec83a5e1c0b7d34de217e7ef038985c695d (patch)
treeaa00bff2ba2168e157784d925a9216b9154e9f7f /vim/plugin
parentf9e95b30a6dedb5f09ef904ae5d1993cd2d6115a (diff)
downloaddotfiles-9fbceec83a5e1c0b7d34de217e7ef038985c695d.tar.gz
dotfiles-9fbceec83a5e1c0b7d34de217e7ef038985c695d.zip
Use idiomatic VimL regex for param validation
\a and \L are, I think, perlre-style VimL regex inventions.
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/toggle_option_flag.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/plugin/toggle_option_flag.vim b/vim/plugin/toggle_option_flag.vim
index b63e0eb8..c3ea01a0 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 =~# '\m[^a-z]'
+ if a:option =~# '\m\L'
echoerr 'Illegal option name'
return
endif
" Weird flags, too; should be a single inoffensive char
- if a:flag !~# '\m^[a-z0-9.]$'
+ if a:flag !~# '\m^[\a.]$'
echoerr 'Illegal flag'
return
endif