Patch 9.0.1653
Problem:    Amiga: default 'viewdir' may not work.
Solution:   Use "home:" instead of "$VIM". Add a test. (Christian Brabandt,
            closes #12576)
Files:      runtime/doc/options.txt, src/os_amiga.h,
            src/testdir/setup.vim, src/testdir/test_mksession.vim


*** ../vim-9.0.1652/runtime/doc/options.txt     2023-06-23 16:15:07.469504475 
+0100
--- runtime/doc/options.txt     2023-06-23 22:17:31.957277077 +0100
***************
*** 8843,8851 ****
        displayed when 'verbosefile' is set.
  
                                                *'viewdir'* *'vdir'*
! 'viewdir' 'vdir'      string  (default for Amiga "$VIM/vimfiles/view",
                                         for Win32: "$HOME/vimfiles/view",
!                                        for Unix: "~/.vim/view",
                                         for macOS: "$VIM/vimfiles/view"
                                         for VMS: "sys$login:vimfiles/view")
                        global
--- 8912,8920 ----
        displayed when 'verbosefile' is set.
  
                                                *'viewdir'* *'vdir'*
! 'viewdir' 'vdir'      string  (default for Amiga "home:vimfiles/view",
                                         for Win32: "$HOME/vimfiles/view",
!                                        for Unix: "$HOME/.vim/view",
                                         for macOS: "$VIM/vimfiles/view"
                                         for VMS: "sys$login:vimfiles/view")
                        global
*** ../vim-9.0.1652/src/os_amiga.h      2023-06-08 22:16:19.688379704 +0100
--- src/os_amiga.h      2023-06-23 22:01:54.977471370 +0100
***************
*** 199,205 ****
  #endif
  
  #ifndef DFLT_VDIR
! # define DFLT_VDIR    "$VIM/vimfiles/view"    // default for 'viewdir'
  #endif
  
  #ifndef DFLT_MAXMEM
--- 199,205 ----
  #endif
  
  #ifndef DFLT_VDIR
! # define DFLT_VDIR    "home:vimfiles/view"    // default for 'viewdir'
  #endif
  
  #ifndef DFLT_MAXMEM
*** ../vim-9.0.1652/src/testdir/setup.vim       2023-01-28 19:18:56.725720605 
+0000
--- src/testdir/setup.vim       2023-06-23 22:14:19.333366654 +0100
***************
*** 30,35 ****
--- 30,39 ----
    " 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'
*** ../vim-9.0.1652/src/testdir/test_mksession.vim      2022-09-29 
21:37:19.321641591 +0100
--- src/testdir/test_mksession.vim      2023-06-23 22:15:59.397324768 +0100
***************
*** 1262,1265 ****
--- 1262,1278 ----
    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
*** ../vim-9.0.1652/src/version.c       2023-06-23 21:36:27.364304002 +0100
--- src/version.c       2023-06-23 22:18:53.045229395 +0100
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1653,
  /**/

-- 
How do I set this laser printer to stun? 

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623212338.708051C054C%40moolenaar.net.

Raspunde prin e-mail lui