summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-05-01 17:05:03 +0000
committerBram Moolenaar <Bram@vim.org>2007-05-01 17:05:03 +0000
commit8243a7928bd29db8bc0ec48fa667dd94389d6e36 (patch)
treedaf813fae0f1692c808621ad2c2aa29c239c8038 /src/option.c
parent914572aba468968be24a0dc6fb324eb923b518e9 (diff)
downloadvim-git-8243a7928bd29db8bc0ec48fa667dd94389d6e36.tar.gz
updated for version 7.0-237v7.0.237
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 87cf5f6d2..d7bd92894 100644
--- a/src/option.c
+++ b/src/option.c
@@ -3429,6 +3429,11 @@ set_option_default(opt_idx, opt_flags, compatible)
/* the cast to long is required for Manx C, long_i is needed for
* MSVC */
*(int *)varp = (int)(long)(long_i)options[opt_idx].def_val[dvi];
+#ifdef UNIX
+ /* 'modeline' defaults to off for root */
+ if (options[opt_idx].indir == PV_ML && getuid() == ROOT_UID)
+ *(int *)varp = FALSE;
+#endif
/* May also set global value for local option. */
if (both)
*(int *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL) =