aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2016-01-15 03:03:18 -0500
committerMichael Reed <m.reed@mykolab.com>2016-01-15 03:03:18 -0500
commitf433f569a319123e09a6536b1a58d1198b2e3255 (patch)
tree4c61a47d54e7ad0d8cb22ec784bc0500c02117b2 /src/nvim/option.c
parentd4fb5920d342de43548e50bd3a968e66d0eea71e (diff)
downloadrneovim-f433f569a319123e09a6536b1a58d1198b2e3255.tar.gz
rneovim-f433f569a319123e09a6536b1a58d1198b2e3255.tar.bz2
rneovim-f433f569a319123e09a6536b1a58d1198b2e3255.zip
Revert ROOT_UID removal
It helps clarify intent for those unaware of root's UID. see https://github.com/neovim/neovim/pull/4015#discussion_r49822371
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index e3df559c49..2ac1abeeba 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -837,10 +837,9 @@ set_option_default (
} else { /* P_BOOL */
*(int *)varp = (int)(intptr_t)options[opt_idx].def_val[dvi];
#ifdef UNIX
- // 'modeline' defaults to off for root
- if (options[opt_idx].indir == PV_ML && getuid() == 0) {
- *(int *)varp = false;
- }
+ /* '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)