Commit: patch 9.1.2067: shadow variable warning in menu.c

1 view
Skip to first unread message

Christian Brabandt

unread,
Jan 8, 2026, 3:46:09 PM (yesterday) Jan 8
to vim...@googlegroups.com
patch 9.1.2067: shadow variable warning in menu.c

Commit: https://github.com/vim/vim/commit/4936e761a5da13fdb6fcc0bb1af075d6c473d6ae
Author: John Marriott <basi...@internode.on.net>
Date: Thu Jan 8 20:29:54 2026 +0000

patch 9.1.2067: shadow variable warning in menu.c

Problem: shadow variable warning in menu.c
Solution: Rename the variable (John Marriott).

closes: #19120

Signed-off-by: John Marriott <basi...@internode.on.net>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/menu.c b/src/menu.c
index fc14e1b72..8b9b3af74 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -721,19 +721,19 @@ add_menu_path(
if (tearpath != NULL)
{
char_u *s;
- int idx;
+ int len;

STRCPY(tearpath, menu_path);
- idx = (int)(next_name - path_name - 1);
- for (s = tearpath; *s && s < tearpath + idx; MB_PTR_ADV(s))
+ len = (int)(next_name - path_name - 1);
+ for (s = tearpath; *s && s < tearpath + len; MB_PTR_ADV(s))
{
if ((*s == '\' || *s == Ctrl_V) && s[1])
{
- ++idx;
+ ++len;
++s;
}
}
- tearpath[idx] = NUL;
+ tearpath[len] = NUL;
gui_add_tearoff(tearpath, pri_tab, pri_idx);
vim_free(tearpath);
}
diff --git a/src/version.c b/src/version.c
index 1f83c825f..003b58ab0 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 */
+/**/
+ 2067,
/**/
2066,
/**/
Reply all
Reply to author
Forward
0 new messages