summaryrefslogtreecommitdiffstats
path: root/src/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 0cd2823851..2acc0d475f 100644
--- a/src/option.c
+++ b/src/option.c
@@ -417,6 +417,14 @@ set_init_xdg_rtp(void)
options[opt_idx].def_val[VI_DEFAULT] = xdg_rtp;
p_pp = xdg_rtp;
+#if defined(XDG_VDIR) && defined(FEAT_SESSION)
+ if ((opt_idx = findoption((char_u *)"viewdir")) < 0)
+ goto theend;
+
+ options[opt_idx].def_val[VI_DEFAULT] = (char_u *)XDG_VDIR;
+ p_vdir = (char_u *)XDG_VDIR;
+#endif
+
theend:
vim_free(vimrc1);
vim_free(vimrc2);