From: Bram Moolenaar Date: Sun, 6 Dec 2020 19:12:43 +0000 (+0100) Subject: patch 8.2.2103: Vim9: unreachable code X-Git-Tag: v8.2.2103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41d6196e302af5f1a99aeeac587b5c662c410166;p=vim patch 8.2.2103: Vim9: unreachable code Problem: Vim9: unreachable code. Solution: Remove the code to prepend s: to the variable name --- diff --git a/src/version.c b/src/version.c index f023d974a..2444f0bda 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2103, /**/ 2102, /**/ diff --git a/src/vim9compile.c b/src/vim9compile.c index bfa54fea7..9f2aaba98 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -5179,19 +5179,9 @@ generate_store_var( if (scriptvar_idx < 0) { char_u *name_s = name; - int r; + int r; - // Include s: in the name for store_var() - if (name[1] != ':') - { - int len = (int)STRLEN(name) + 3; - - name_s = alloc(len); - if (name_s == NULL) - name_s = name; - else - vim_snprintf((char *)name_s, len, "s:%s", name); - } + // "s:" is included in the name. r = generate_OLDSCRIPT(cctx, ISN_STORES, name_s, scriptvar_sid, type); if (name_s != name)