From 38e1e6335c144fe52eb908e63c6b2cad5a1006ab Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 15 Nov 2015 22:43:25 +0900 Subject: [PATCH] Case-sensitive validation of on arguments (#314) --- plug.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 6541ace..80f9629 100644 --- a/plug.vim +++ b/plug.vim @@ -175,11 +175,14 @@ function! plug#end() call s:assoc(lod.map, cmd, name) endif call add(s:triggers[name].map, cmd) - elseif cmd =~ '^[A-Z]' + elseif cmd =~# '^[A-Z]' if exists(':'.cmd) != 2 call s:assoc(lod.cmd, cmd, name) endif call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or ``.') endif endfor endif