forked from aniani/vim
patch 9.1.0393: 'viewdir' not respecting $XDG_CONFIG_HOME
Problem: 'viewdir' not respecting $XDG_CONFIG_HOME (Danilo Rezende, after v9.1.327) Solution: adjust 'viewdir' option when enabling XDG config mode fixes: #14680 closes: #14708 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user