patch 8.2.4657: errors for functions are sometimes hard to read
Problem: Errors for functions are sometimes hard to read.
Solution: Use printable_func_name() in more places.
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 72bf1ad..9c18994 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -698,7 +698,7 @@
char_u *name = *arg;
char_u *p;
int argcount = argcount_init;
- char_u namebuf[100];
+ char_u namebuf[MAX_FUNC_NAME_LEN];
char_u fname_buf[FLEN_FIXED + 1];
char_u *tofree = NULL;
int error = FCERR_NONE;
@@ -818,7 +818,7 @@
res = generate_BCALL(cctx, idx, argcount, argcount_init == 1);
}
else
- semsg(_(e_unknown_function_str), namebuf);
+ emsg_funcname(e_unknown_function_str, namebuf);
goto theend;
}
@@ -843,7 +843,7 @@
&& vim_strchr(ufunc->uf_name, AUTOLOAD_CHAR) == NULL)
{
// A function name without g: prefix must be found locally.
- semsg(_(e_unknown_function_str), namebuf);
+ emsg_funcname(e_unknown_function_str, namebuf);
goto theend;
}
}
@@ -874,7 +874,7 @@
if (has_g_namespace || is_autoload)
res = generate_UCALL(cctx, name, argcount);
else
- semsg(_(e_unknown_function_str), namebuf);
+ emsg_funcname(e_unknown_function_str, namebuf);
theend:
vim_free(tofree);