Case-sensitive validation of on arguments (#314)
This commit is contained in:
parent
0c710f75f4
commit
38e1e6335c
1 changed files with 4 additions and 1 deletions
5
plug.vim
5
plug.vim
|
@ -175,11 +175,14 @@ function! plug#end()
|
||||||
call s:assoc(lod.map, cmd, name)
|
call s:assoc(lod.map, cmd, name)
|
||||||
endif
|
endif
|
||||||
call add(s:triggers[name].map, cmd)
|
call add(s:triggers[name].map, cmd)
|
||||||
elseif cmd =~ '^[A-Z]'
|
elseif cmd =~# '^[A-Z]'
|
||||||
if exists(':'.cmd) != 2
|
if exists(':'.cmd) != 2
|
||||||
call s:assoc(lod.cmd, cmd, name)
|
call s:assoc(lod.cmd, cmd, name)
|
||||||
endif
|
endif
|
||||||
call add(s:triggers[name].cmd, cmd)
|
call add(s:triggers[name].cmd, cmd)
|
||||||
|
else
|
||||||
|
call s:err('Invalid `on` option: '.cmd.
|
||||||
|
\ '. Should start with an uppercase letter or `<Plug>`.')
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue