To: vim_dev@googlegroups.com Subject: Patch 8.0.1704 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1704 Problem: 'backupskip' default doesn't work for Mac. Solution: Use "/private/tmp". (Rainer Müller, closes #2793) Files: src/option.c, src/testdir/test_options.vim, runtime/doc/options.txt *** ../vim-8.0.1703/src/option.c 2018-04-10 18:47:16.097527017 +0200 --- src/option.c 2018-04-12 21:28:11.026672734 +0200 *************** *** 3367,3373 **** --- 3367,3377 ---- mustfree = FALSE; # ifdef UNIX if (*names[n] == NUL) + # ifdef MACOS_X + p = (char_u *)"/private/tmp"; + # else p = (char_u *)"/tmp"; + # endif else # endif p = vim_getenv((char_u *)names[n], &mustfree); *** ../vim-8.0.1703/src/testdir/test_options.vim 2017-04-20 22:57:22.815237745 +0200 --- src/testdir/test_options.vim 2018-04-12 21:35:26.715402351 +0200 *************** *** 332,334 **** --- 332,350 ---- call assert_equal('', &indentexpr) bwipe! 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 *** ../vim-8.0.1703/runtime/doc/options.txt 2018-03-16 20:46:52.678189946 +0100 --- runtime/doc/options.txt 2018-04-12 21:29:34.250044703 +0200 *************** *** 1051,1057 **** < Use 'backupdir' to put the backup in a different directory. *'backupskip'* *'bsk'* ! 'backupskip' 'bsk' string (default: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") global {not in Vi} {not available when compiled without the |+wildignore| --- 1087,1095 ---- < Use 'backupdir' to put the backup in a different directory. *'backupskip'* *'bsk'* ! 'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*" ! Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" ! Mac: "/private/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") global {not in Vi} {not available when compiled without the |+wildignore| *** ../vim-8.0.1703/src/version.c 2018-04-12 20:36:39.262050257 +0200 --- src/version.c 2018-04-12 21:31:34.569139931 +0200 *************** *** 764,765 **** --- 764,767 ---- { /* Add new patch number below this line */ + /**/ + 1704, /**/ -- Apathy Error: Don't bother striking any key. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///