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>
diff --git a/src/testdir/test_xdg.vim b/src/testdir/test_xdg.vim
index 6f35b72..b9ec3c7 100644
--- a/src/testdir/test_xdg.vim
+++ b/src/testdir/test_xdg.vim
@@ -80,6 +80,7 @@
call assert_match('XfakeHOME/\.vimrc', $MYVIMRC)
call filter(g:, {idx, _ -> idx =~ '^rc'})
call assert_equal(#{rc_one: 'one', rc: '.vimrc'}, g:)
+ call assert_match('XfakeHOME/\.vim/view', &viewdir)
call writefile(v:errors, 'Xresult')
quit
END
@@ -94,6 +95,7 @@
call assert_match('XfakeHOME/\.vim/vimrc', $MYVIMRC)
call filter(g:, {idx, _ -> idx =~ '^rc'})
call assert_equal(#{rc_two: 'two', rc: '.vim/vimrc'}, g:)
+ call assert_match('XfakeHOME/\.vim/view', &viewdir)
call writefile(v:errors, 'Xresult')
quit
END
@@ -112,6 +114,7 @@
call assert_match('XfakeHOME/\.config/vim/vimrc', $MYVIMRC, msg)
call filter(g:, {idx, _ -> idx =~ '^rc'})
call assert_equal(#{rc_three: 'three', rc: '.config/vim/vimrc'}, g:)
+ call assert_match('XfakeHOME/\.config/vim/view', &viewdir)
call writefile(v:errors, 'Xresult')
quit
END
@@ -128,6 +131,7 @@
call assert_match('XfakeHOME/xdg/vim/vimrc', $MYVIMRC, msg)
call filter(g:, {idx, _ -> idx =~ '^rc'})
call assert_equal(#{rc_four: 'four', rc: 'xdg/vim/vimrc'}, g:)
+ call assert_match('XfakeHOME/xdg/vim/view, &viewdir)
call writefile(v:errors, 'Xresult')
quit
END