patch 9.2.0100: Using reserved keyword new as function argument
Commit:
https://github.com/vim/vim/commit/238a84621d9fa3a48fa46567383a147704205b2e
Author: Wei Tang <
gauc...@uestc.edu.cn>
Date: Tue Mar 3 19:50:15 2026 +0000
patch 9.2.0100: Using reserved keyword new as function argument
Problem: A recent commit introduced a new function named
`update_highlight_overrides()` in `
highlight.pro` and
`highlight.c`, one of the parameter names conflicts with the C++
keyword `new`. This causes compilation issues on Windows when
VIM is compiled with OLE enabled, as "if_ole.cpp" cannot compile
due to the conflict (after v9.2.0093).
Solution: Rename the parameter name of `update_highlight_overrides()`
from new to hl_new (Wei Tang)
fixes: #19568
closes: #19558
Signed-off-by: Wei Tang <
gauc...@uestc.edu.cn>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/highlight.c b/src/highlight.c
index b22cda587..efd24b647 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -5458,11 +5458,11 @@ f_hlset(typval_T *argvars, typval_T *rettv)
#endif
/*
- * If "old" is in the override stack, then update it to "new". Does not free
+ * If "old" is in the override stack, then update it to "hl_new". Does not free
* "old".
*/
void
-update_highlight_overrides(hl_override_T *old, hl_override_T *new, int newlen)
+update_highlight_overrides(hl_override_T *old, hl_override_T *hl_new, int newlen)
{
if (old == NULL)
return;
@@ -5471,7 +5471,7 @@ update_highlight_overrides(hl_override_T *old, hl_override_T *new, int newlen)
{
if (set->arr == old)
{
- set->arr = new;
+ set->arr = hl_new;
set->len = newlen;
break;
}
diff --git a/src/proto/
highlight.pro b/src/proto/
highlight.pro
index a7691c88f..46fb5dbbe 100644
--- a/src/proto/
highlight.pro
+++ b/src/proto/
highlight.pro
@@ -48,7 +48,7 @@ int expand_highlight_group(char_u *pat, expand_T *xp, regmatch_T *rmp, char_u **
void free_highlight_fonts(void);
void f_hlget(typval_T *argvars, typval_T *rettv);
void f_hlset(typval_T *argvars, typval_T *rettv);
-void update_highlight_overrides(hl_override_T *old, hl_override_T *new, int newlen);
+void update_highlight_overrides(hl_override_T *old, hl_override_T *hl_new, int newlen);
bool push_highlight_overrides(hl_override_T *arr, int len);
void pop_highlight_overrides(void);
char *update_winhighlight(win_T *wp, char_u *opt);
diff --git a/src/version.c b/src/version.c
index f2e546cb1..4f86d6cc1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 100,
/**/
99,
/**/