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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 182834c4f3..71d19e24f1 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -4945,11 +4945,16 @@ set_bool_option (
if ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0)
*(int *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) = value;
+ // Ensure that compatible can not be enabled
if ((int *)varp == &p_cp && p_cp == TRUE) {
- /* Ensure that compatible can not be enabled */
p_cp = FALSE;
return e_unsupportedoption;
}
+ // Ensure that edcompatible can not be enabled
+ else if ((int *)varp == &p_ed && p_ed == TRUE) {
+ p_ed = FALSE;
+ return e_unsupportedoption;
+ }
/* 'undofile' */
else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf) {
/* Only take action when the option was set. When reset we do not