Patch 8.2.4535
Problem:    Filename modifer ":8" removes the filename.
Solution:   Use strncpy() instead of vim_strncpy(). (Christian Brabandt,
            closes #9918, closes #8600)
Files:      src/filepath.c, src/testdir/test_shortpathname.vim


*** ../vim-8.2.4534/src/filepath.c      2022-02-19 11:19:29.821776577 +0000
--- src/filepath.c      2022-03-10 11:51:27.773748021 +0000
***************
*** 186,192 ****
            // unless get_short_pathname() did its work in-place.
            *fname = *bufp = save_fname;
            if (short_fname != save_fname)
!               vim_strncpy(save_fname, short_fname, len);
            save_fname = NULL;
        }
  
--- 186,192 ----
            // unless get_short_pathname() did its work in-place.
            *fname = *bufp = save_fname;
            if (short_fname != save_fname)
!               STRNCPY(save_fname, short_fname, len);
            save_fname = NULL;
        }
  
*** ../vim-8.2.4534/src/testdir/test_shortpathname.vim  2020-08-12 
17:50:31.887655765 +0100
--- src/testdir/test_shortpathname.vim  2022-03-10 11:51:27.773748021 +0000
***************
*** 88,91 ****
--- 88,96 ----
    call delete(dir, 'd')
  endfunc
  
+ func Test_ColonEight_notexists()
+   let non_exists='C:\windows\newfile.txt'
+   call assert_equal(non_exists, fnamemodify(non_exists, ':p:8'))
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.4534/src/version.c       2022-03-10 12:20:48.542552970 +0000
--- src/version.c       2022-03-10 12:23:43.622187660 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4535,
  /**/

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

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220310122439.CE2041C0DCA%40moolenaar.net.

Raspunde prin e-mail lui