0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 9.0.1653: Amiga: default 'viewdir' may not work

Problem:    Amiga: default 'viewdir' may not work.
Solution:   Use "home:" instead of "$VIM". Add a test. (Christian Brabandt,
            closes #12576)
This commit is contained in:
Christian Brabandt
2023-06-23 22:23:01 +01:00
committed by Bram Moolenaar
parent bd32e8ad8d
commit b8b1c8ebd4
5 changed files with 22 additions and 3 deletions

View File

@@ -199,7 +199,7 @@ typedef long off_t;
#endif
#ifndef DFLT_VDIR
# define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir'
# define DFLT_VDIR "home:vimfiles/view" // default for 'viewdir'
#endif
#ifndef DFLT_MAXMEM

View File

@@ -30,6 +30,10 @@ if 1
" Avoid storing shell history.
let $HISTFILE = ""
" Have current $HOME available as $ORIGHOME. $HOME is used for option
" defaults before we get here, and test_mksession checks that.
let $ORIGHOME = $HOME
" Make sure $HOME does not get read or written.
" It must exist, gnome tries to create $HOME/.gnome2
let $HOME = getcwd() . '/XfakeHOME'

View File

@@ -1262,4 +1262,17 @@ func Test_mkview_manual_fold()
bw!
endfunc
" Test default 'viewdir' value
func Test_mkview_default_home()
if has('win32')
call assert_match('^' .. $ORIGHOME .. '/vimfiles', &viewdir)
elseif has('unix')
call assert_match('^' .. $ORIGHOME .. '/.vim', &viewdir)
elseif has('amiga')
call assert_match('^home:vimfiles', &viewdir)
elseif has('mac')
call assert_match('^' .. $VIM .. '/vimfiles', &viewdir)
endif
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1653,
/**/
1652,
/**/