patch 8.2.2182: Vim9: value of 'magic' is still relevant
Problem: Vim9: value of 'magic' is still relevant.
Solution: Always behave like 'magic' is on in Vim9 script (closes #7509)
diff --git a/src/globals.h b/src/globals.h
index 4f54d0f..d7887bb 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1938,3 +1938,8 @@
#define FOR_ALL_LIST_ITEMS(l, li) \
for ((li) = (l)->lv_first; (li) != NULL; (li) = (li)->li_next)
+
+// While executing a regexp and set to MAGIC_ON or MAGIC_OFF this overrules
+// p_magic. Otherwise set to MAGIC_NOT_SET.
+
+EXTERN magic_T magic_overruled INIT(= MAGIC_NOT_SET);