changeset 32357:5e2f81645b10 v9.0.1510

patch 9.0.1510: misleading variable name for error message Commit: https://github.com/vim/vim/commit/70e8028a4d63c83f67bc3314d064613e2041e462 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 5 22:58:34 2023 +0100 patch 9.0.1510: misleading variable name for error message Problem: Misleading variable name for error message. Solution: Change "name" to "number". (closes https://github.com/vim/vim/issues/12345)
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 May 2023 00:00:03 +0200
parents 9544f61c1275
children 097336f579d7
files src/errors.h src/ex_docmd.c src/version.c
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/errors.h
+++ b/src/errors.h
@@ -1236,7 +1236,7 @@ EXTERN char e_use_w_or_w_gt_gt[]
 	INIT(= N_("E494: Use w or w>>"));
 EXTERN char e_no_autocommand_file_name_to_substitute_for_afile[]
 	INIT(= N_("E495: No autocommand file name to substitute for \"<afile>\""));
-EXTERN char e_no_autocommand_buffer_name_to_substitute_for_abuf[]
+EXTERN char e_no_autocommand_buffer_number_to_substitute_for_abuf[]
 	INIT(= N_("E496: No autocommand buffer number to substitute for \"<abuf>\""));
 EXTERN char e_no_autocommand_match_name_to_substitute_for_amatch[]
 	INIT(= N_("E497: No autocommand match name to substitute for \"<amatch>\""));
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -6150,7 +6150,8 @@ get_tabpage_arg(exarg_T *eap)
 		    tab_number = tabpage_index(lastused_tabpage);
 		else
 		{
-		    eap->errmsg = ex_errmsg(e_invalid_value_for_argument_str, eap->arg);
+		    eap->errmsg = ex_errmsg(e_invalid_value_for_argument_str,
+								     eap->arg);
 		    tab_number = 0;
 		    goto theend;
 		}
@@ -9380,7 +9381,7 @@ eval_vars(
 	case SPEC_ABUF:		// buffer number for autocommand
 		if (autocmd_bufnr <= 0)
 		{
-		    *errormsg = _(e_no_autocommand_buffer_name_to_substitute_for_abuf);
+		    *errormsg = _(e_no_autocommand_buffer_number_to_substitute_for_abuf);
 		    return NULL;
 		}
 		sprintf((char *)strbuf, "%d", autocmd_bufnr);
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1510,
+/**/
     1509,
 /**/
     1508,