aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index e67bacce61..eac8e09d9e 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -5147,6 +5147,20 @@ int fill_culopt_flags(char *val, win_T *wp)
return OK;
}
+/// Get the value of 'magic' taking "magic_overruled" into account.
+bool magic_isset(void)
+{
+ switch (magic_overruled) {
+ case MAGIC_ON:
+ return true;
+ case MAGIC_OFF:
+ return false;
+ case MAGIC_NOT_SET:
+ break;
+ }
+ return p_magic;
+}
+
/// Set the callback function value for an option that accepts a function name,
/// lambda, et al. (e.g. 'operatorfunc', 'tagfunc', etc.)
/// @return OK if the option is successfully set to a function, otherwise FAIL