patch 8.2.3174: Vim9: "legacy undo" finds "undo" variable
Problem: Vim9: "legacy undo" finds "undo" variable.
Solution: Do not pass lookup function to find_ex_command(). (closes #8563)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 956ce44..9ae11a5 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -9510,7 +9510,8 @@
}
}
}
- 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)