diff src/userfunc.c @ 23877:85cf06ddb2a8 v8.2.2480

patch 8.2.2480: Vim9: some errors for white space do not show context Commit: https://github.com/vim/vim/commit/c3fc75db023f2acd0b82b7eebffd7ed89e8001ed Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 7 15:28:09 2021 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 07 Feb 2021 15:30:03 +0100
parents 950875545045
children 9ddf1a537fc2
line wrap: on
line diff
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -126,7 +126,7 @@ one_function_arg(
 	    ++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 @@ get_function_args(
 		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 @@ skip_arrow(
 	    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 @@ get_func_tv(
 	    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;
 	}