forked from aniani/vim
patch 8.0.1704: 'backupskip' default doesn't work for Mac
Problem: 'backupskip' default doesn't work for Mac. Solution: Use "/private/tmp". (Rainer Müller, closes #2793)
This commit is contained in:
parent
527dec3f94
commit
b8e22a053b
@ -1087,7 +1087,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
< Use 'backupdir' to put the backup in a different directory.
|
< Use 'backupdir' to put the backup in a different directory.
|
||||||
|
|
||||||
*'backupskip'* *'bsk'*
|
*'backupskip'* *'bsk'*
|
||||||
'backupskip' 'bsk' string (default: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*")
|
'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*"
|
||||||
|
Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*"
|
||||||
|
Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*")
|
||||||
global
|
global
|
||||||
{not in Vi}
|
{not in Vi}
|
||||||
{not available when compiled without the |+wildignore|
|
{not available when compiled without the |+wildignore|
|
||||||
|
@ -3367,7 +3367,11 @@ set_init_1(int clean_arg)
|
|||||||
mustfree = FALSE;
|
mustfree = FALSE;
|
||||||
# ifdef UNIX
|
# ifdef UNIX
|
||||||
if (*names[n] == NUL)
|
if (*names[n] == NUL)
|
||||||
|
# ifdef MACOS_X
|
||||||
|
p = (char_u *)"/private/tmp";
|
||||||
|
# else
|
||||||
p = (char_u *)"/tmp";
|
p = (char_u *)"/tmp";
|
||||||
|
# endif
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
p = vim_getenv((char_u *)names[n], &mustfree);
|
p = vim_getenv((char_u *)names[n], &mustfree);
|
||||||
|
@ -332,3 +332,19 @@ func Test_set_indentexpr()
|
|||||||
call assert_equal('', &indentexpr)
|
call assert_equal('', &indentexpr)
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_backupskip()
|
||||||
|
if has("mac")
|
||||||
|
call assert_match('/private/tmp/\*', &bsk)
|
||||||
|
elseif has("unix")
|
||||||
|
call assert_match('/tmp/\*', &bsk)
|
||||||
|
endif
|
||||||
|
|
||||||
|
let bskvalue = substitute(&bsk, '\\', '/', 'g')
|
||||||
|
for var in ['$TEMPDIR', '$TMP', '$TEMP']
|
||||||
|
if exists(var)
|
||||||
|
let varvalue = substitute(expand(var), '\\', '/', 'g')
|
||||||
|
call assert_match(varvalue . '.\*', bskvalue)
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunc
|
||||||
|
@ -762,6 +762,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 */
|
||||||
|
/**/
|
||||||
|
1704,
|
||||||
/**/
|
/**/
|
||||||
1703,
|
1703,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user