From ec792290eb902e01c9edfc0cb71e5235833df56a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 13 Dec 2020 21:26:56 +0100 Subject: [PATCH] patch 8.2.2143: Vim9: dead code in compiling :unlet Problem: Vim9: dead code in compiling :unlet. Solution: Don't check for "!" a second time. --- src/version.c | 2 ++ src/vim9compile.c | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/version.c b/src/version.c index be7e4f088..be8c64a5e 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 */ +/**/ + 2143, /**/ 2142, /**/ diff --git a/src/vim9compile.c b/src/vim9compile.c index 3fae25e11..86d3260d9 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -5993,7 +5993,7 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx) // for "[var, var] = expr" drop the "expr" value if (var_count > 0 && !semicolon) { - if (generate_instr_drop(cctx, ISN_DROP, 1) == NULL) + if (generate_instr_drop(cctx, ISN_DROP, 1) == NULL) goto theend; } @@ -6074,12 +6074,6 @@ compile_unletlock(char_u *arg, exarg_T *eap, cctx_T *cctx) return NULL; } - if (*p == '!') - { - p = skipwhite(p + 1); - eap->forceit = TRUE; - } - ex_unletlock(eap, p, 0, GLV_NO_AUTOLOAD, compile_unlet, cctx); return eap->nextcmd == NULL ? (char_u *)"" : eap->nextcmd; } -- 2.40.0