summaryrefslogtreecommitdiff
path: root/src/userfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-22 19:15:24 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-22 19:15:24 +0200
commitd6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa (patch)
tree746839083abe888f4424f18c38ac634eec06981b /src/userfunc.c
parent663bb2331626944cea156374858131fcd323b9e9 (diff)
downloadvim-git-d6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa.tar.gz
patch 8.0.0655: not easy to make sure a function does not existv8.0.0655
Problem: Not easy to make sure a function does not exist. Solution: Add ! as an optional argument to :delfunc.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r--src/userfunc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index de089bb68..34da2ef4b 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -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)