forked from aniani/vim
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:
parent
bd32e8ad8d
commit
b8b1c8ebd4
@ -8912,9 +8912,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
displayed when 'verbosefile' is set.
|
displayed when 'verbosefile' is set.
|
||||||
|
|
||||||
*'viewdir'* *'vdir'*
|
*'viewdir'* *'vdir'*
|
||||||
'viewdir' 'vdir' string (default for Amiga "$VIM/vimfiles/view",
|
'viewdir' 'vdir' string (default for Amiga "home:vimfiles/view",
|
||||||
for Win32: "$HOME/vimfiles/view",
|
for Win32: "$HOME/vimfiles/view",
|
||||||
for Unix: "~/.vim/view",
|
for Unix: "$HOME/.vim/view",
|
||||||
for macOS: "$VIM/vimfiles/view"
|
for macOS: "$VIM/vimfiles/view"
|
||||||
for VMS: "sys$login:vimfiles/view")
|
for VMS: "sys$login:vimfiles/view")
|
||||||
global
|
global
|
||||||
|
@ -199,7 +199,7 @@ typedef long off_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DFLT_VDIR
|
#ifndef DFLT_VDIR
|
||||||
# define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir'
|
# define DFLT_VDIR "home:vimfiles/view" // default for 'viewdir'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DFLT_MAXMEM
|
#ifndef DFLT_MAXMEM
|
||||||
|
@ -30,6 +30,10 @@ if 1
|
|||||||
" Avoid storing shell history.
|
" Avoid storing shell history.
|
||||||
let $HISTFILE = ""
|
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.
|
" Make sure $HOME does not get read or written.
|
||||||
" It must exist, gnome tries to create $HOME/.gnome2
|
" It must exist, gnome tries to create $HOME/.gnome2
|
||||||
let $HOME = getcwd() . '/XfakeHOME'
|
let $HOME = getcwd() . '/XfakeHOME'
|
||||||
|
@ -1262,4 +1262,17 @@ func Test_mkview_manual_fold()
|
|||||||
bw!
|
bw!
|
||||||
endfunc
|
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
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1653,
|
||||||
/**/
|
/**/
|
||||||
1652,
|
1652,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user