diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-17 21:24:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-17 21:24:56 +0200 |
commit | 47bc9c333766ee3d45cb18c583a630e4ad53405a (patch) | |
tree | 63d42b249149ec6a09f11781d7c29dd2d07cc2f3 /src | |
parent | a9a7c0c602b231dc37c4b0f62ade0421c84fca03 (diff) |
patch 8.2.3174: Vim9: "legacy undo" finds "undo" variablev8.2.3174
Problem: Vim9: "legacy undo" finds "undo" variable.
Solution: Do not pass lookup function to find_ex_command(). (closes #8563)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_vim9_assign.vim | 7 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim index 3599d6c5d1..a33038c9a1 100644 --- a/src/testdir/test_vim9_assign.vim +++ b/src/testdir/test_vim9_assign.vim @@ -1632,6 +1632,13 @@ def Test_script_local_in_legacy() let s:legvar = 'one' END CheckScriptFailure(lines, 'E476:', 1) + + edit! Xfile + lines =<< trim END + var edit: bool + legacy edit + END + CheckDefAndScriptSuccess(lines) enddef def Test_var_type_check() diff --git a/src/version.c b/src/version.c index f7e2c17a0a..e1421ddb4e 100644 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3174, +/**/ 3173, /**/ 3172, diff --git a/src/vim9compile.c b/src/vim9compile.c index 956ce44eb0..9ae11a54b1 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -9510,7 +9510,8 @@ compile_def_function( } } } - p = find_ex_command(&ea, NULL, starts_with_colon + p = find_ex_command(&ea, NULL, + starts_with_colon || (local_cmdmod.cmod_flags & CMOD_LEGACY) ? NULL : item_exists, &cctx); if (p == NULL) |