Skip to content

Commit 41d6196

Browse files
committed
patch 8.2.2103: Vim9: unreachable code
Problem: Vim9: unreachable code. Solution: Remove the code to prepend s: to the variable name
1 parent 5402175 commit 41d6196

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2103,
753755
/**/
754756
2102,
755757
/**/

src/vim9compile.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5179,19 +5179,9 @@ generate_store_var(
51795179
if (scriptvar_idx < 0)
51805180
{
51815181
char_u *name_s = name;
5182-
int r;
5182+
int r;
51835183

5184-
// Include s: in the name for store_var()
5185-
if (name[1] != ':')
5186-
{
5187-
int len = (int)STRLEN(name) + 3;
5188-
5189-
name_s = alloc(len);
5190-
if (name_s == NULL)
5191-
name_s = name;
5192-
else
5193-
vim_snprintf((char *)name_s, len, "s:%s", name);
5194-
}
5184+
// "s:" is included in the name.
51955185
r = generate_OLDSCRIPT(cctx, ISN_STORES, name_s,
51965186
scriptvar_sid, type);
51975187
if (name_s != name)

0 commit comments

Comments
 (0)