Skip to content

Commit 5cebca2

Browse files
committed
patch 8.2.3349: eval test for scriptversion fails
Problem: Eval test for scriptversion fails. Solution: Fix off-by-one error.
1 parent 14c7530 commit 5cebca2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/version.c

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

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3349,
758760
/**/
759761
3348,
760762
/**/

src/vim9script.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ in_vim9script(void)
4040
int
4141
in_old_script(int max_version)
4242
{
43-
return (current_sctx.sc_version <= max_version
44-
&& !(cmdmod.cmod_flags & CMOD_VIM9CMD))
43+
return (current_sctx.sc_version < max_version
44+
&& !(cmdmod.cmod_flags & CMOD_VIM9CMD))
4545
|| (cmdmod.cmod_flags & CMOD_LEGACY);
4646
}
4747

0 commit comments

Comments
 (0)