patch 8.2.3408: can delete a numbered function
Problem: Can delete a numbered function. (Naohiro Ono)
Solution: Disallow deleting a numbered function. (closes #8760)
diff --git a/src/userfunc.c b/src/userfunc.c
index aa55bc8..e51df51 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4669,6 +4669,13 @@
if (eap->nextcmd != NULL)
*p = NUL;
+ if (isdigit(*name) && fudi.fd_dict == NULL)
+ {
+ if (!eap->skip)
+ semsg(_(e_invarg2), eap->arg);
+ vim_free(name);
+ return;
+ }
if (!eap->skip)
fp = find_func(name, is_global, NULL);
vim_free(name);