1
0
forked from aniani/vim

patch 8.0.0655: not easy to make sure a function does not exist

Problem:    Not easy to make sure a function does not exist.
Solution:   Add ! as an optional argument to :delfunc.
This commit is contained in:
Bram Moolenaar
2017-06-22 19:15:24 +02:00
parent 663bb23316
commit d6abcd154c
4 changed files with 15 additions and 2 deletions

View File

@@ -2807,7 +2807,8 @@ ex_delfunction(exarg_T *eap)
{
if (fp == NULL)
{
EMSG2(_(e_nofunc), eap->arg);
if (!eap->forceit)
EMSG2(_(e_nofunc), eap->arg);
return;
}
if (fp->uf_calls > 0)