patch 8.2.2480: Vim9: some errors for white space do not show context
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
diff --git a/src/userfunc.c b/src/userfunc.c
index bdf4064..e220781 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -126,7 +126,7 @@
++p;
if (!skip && !VIM_ISWHITE(*p))
{
- semsg(_(e_white_space_required_after_str), ":");
+ semsg(_(e_white_space_required_after_str_str), ":", p - 1);
return arg;
}
type = skipwhite(p);
@@ -297,7 +297,7 @@
if (!skip && in_vim9script()
&& !IS_WHITE_OR_NUL(*p) && *p != endchar)
{
- semsg(_(e_white_space_required_after_str), ",");
+ semsg(_(e_white_space_required_after_str_str), ",", p - 1);
goto err_ret;
}
}
@@ -487,7 +487,7 @@
if (white_error != NULL && !VIM_ISWHITE(s[1]))
{
*white_error = TRUE;
- semsg(_(e_white_space_required_after_str), ":");
+ semsg(_(e_white_space_required_after_str_str), ":", s);
return NULL;
}
s = skipwhite(s + 1);
@@ -884,7 +884,7 @@
break;
if (vim9script && !IS_WHITE_OR_NUL(argp[1]))
{
- semsg(_(e_white_space_required_after_str), ",");
+ semsg(_(e_white_space_required_after_str_str), ",", argp);
ret = FAIL;
break;
}