summaryrefslogtreecommitdiffstats
path: root/src/os_unix.h
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2024-05-04 09:48:15 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-04 09:48:15 +0200
commitc3e6e393cbd0ee171001d75fc2310070da81b657 (patch)
tree50c79fd805eff88063ae213a340f98ae41f6af65 /src/os_unix.h
parent7edde3f39e755a573ae863de9b88f90d13c2f88b (diff)
patch 9.1.0393: 'viewdir' not respecting $XDG_CONFIG_HOMEv9.1.0393
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>
Diffstat (limited to 'src/os_unix.h')
-rw-r--r--src/os_unix.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os_unix.h b/src/os_unix.h
index 6efd8ce7a1..99184abe6c 100644
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -347,6 +347,8 @@ typedef struct dsc$descriptor DESC;
# define DFLT_VDIR "sys$login:vimfiles/view"
# else
# define DFLT_VDIR "$HOME/.vim/view" // default for 'viewdir'
+# define XDG_VDIR (mch_getenv("XDG_CONFIG_HOME") ? \
+ "$XDG_CONFIG_HOME/vim/view" : "~/.config/vim/view")
# endif
#endif