diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-02-11 15:47:05 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-02-11 15:47:05 +0000 |
commit | 1bf0ddcbfeb5f637ef138ce4f245c0aa86e66273 (patch) | |
tree | bb6ff2b650496d413890deffd016cca5478e2289 /src/option.c | |
parent | 4352f134efb02c197f0f89e3708fd480fa5d1672 (diff) | |
download | vim-git-1bf0ddcbfeb5f637ef138ce4f245c0aa86e66273.tar.gz |
updated for version 7.2-105v7.2.105
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/option.c b/src/option.c index dcc11fcf2..5c78269d8 100644 --- a/src/option.c +++ b/src/option.c @@ -4119,11 +4119,21 @@ do_set(arg, opt_flags) && options[opt_idx].var == VAR_WIN) goto skip; - /* Disallow changing some options from modelines */ - if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE)) + /* Disallow changing some options from modelines. */ + if (opt_flags & OPT_MODELINE) { - errmsg = (char_u *)_("E520: Not allowed in a modeline"); - goto skip; + if (flags & P_SECURE) + { + errmsg = (char_u *)_("E520: Not allowed in a modeline"); + goto skip; + } + /* In diff mode some options are overruled. This avoids that + * 'foldmethod' becomes "marker" instead of "diff" and that + * "wrap" gets set. */ + if (curwin->w_p_diff + && (options[opt_idx].indir == PV_FDM + || options[opt_idx].indir == PV_WRAP)) + goto skip; } #ifdef HAVE_SANDBOX |