summaryrefslogtreecommitdiffstats
path: root/src/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 935a3250e0..dd09e0e764 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6996,3 +6996,22 @@ fill_culopt_flags(char_u *val, win_T *wp)
return OK;
}
#endif
+
+/*
+ * Get the value of 'magic' adjusted for Vim9 script.
+ */
+ int
+magic_isset(void)
+{
+ switch (magic_overruled)
+ {
+ case MAGIC_ON: return TRUE;
+ case MAGIC_OFF: return FALSE;
+ case MAGIC_NOT_SET: break;
+ }
+#ifdef FEAT_EVAL
+ if (in_vim9script())
+ return TRUE;
+#endif
+ return p_magic;
+}