summaryrefslogtreecommitdiff
path: root/src/vim9script.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-15 14:39:13 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-15 14:39:13 +0200
commit5cebca27b831880fb6e191e5271ee614625e1f8a (patch)
tree15ce68c12173fc8e778033fe3346e5920f9d5fe9 /src/vim9script.c
parent14c7530c4fca786d3594508e28943f10125827c3 (diff)
downloadvim-git-5cebca27b831880fb6e191e5271ee614625e1f8a.tar.gz
patch 8.2.3349: eval test for scriptversion failsv8.2.3349
Problem: Eval test for scriptversion fails. Solution: Fix off-by-one error.
Diffstat (limited to 'src/vim9script.c')
-rw-r--r--src/vim9script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vim9script.c b/src/vim9script.c
index 19991097a..9ddc48930 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -40,8 +40,8 @@ in_vim9script(void)
int
in_old_script(int max_version)
{
- return (current_sctx.sc_version <= max_version
- && !(cmdmod.cmod_flags & CMOD_VIM9CMD))
+ return (current_sctx.sc_version < max_version
+ && !(cmdmod.cmod_flags & CMOD_VIM9CMD))
|| (cmdmod.cmod_flags & CMOD_LEGACY);
}