Skip to content

Commit ec79229

Browse files
committed
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.
1 parent fffdf47 commit ec79229

2 files changed

Lines changed: 3 additions & 7 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+
2143,
753755
/**/
754756
2142,
755757
/**/

src/vim9compile.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5993,7 +5993,7 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
59935993
// for "[var, var] = expr" drop the "expr" value
59945994
if (var_count > 0 && !semicolon)
59955995
{
5996-
if (generate_instr_drop(cctx, ISN_DROP, 1) == NULL)
5996+
if (generate_instr_drop(cctx, ISN_DROP, 1) == NULL)
59975997
goto theend;
59985998
}
59995999

@@ -6074,12 +6074,6 @@ compile_unletlock(char_u *arg, exarg_T *eap, cctx_T *cctx)
60746074
return NULL;
60756075
}
60766076

6077-
if (*p == '!')
6078-
{
6079-
p = skipwhite(p + 1);
6080-
eap->forceit = TRUE;
6081-
}
6082-
60836077
ex_unletlock(eap, p, 0, GLV_NO_AUTOLOAD, compile_unlet, cctx);
60846078
return eap->nextcmd == NULL ? (char_u *)"" : eap->nextcmd;
60856079
}

0 commit comments

Comments
 (0)