Patch 8.1.0803
Problem:    Session file has problem with single quote in file name. (Jon
            Crowe)
Solution:   Use a double quoted string.  Add a test.
Files:      src/ex_docmd.c, src/testdir/test_mksession.vim


*** ../vim-8.1.0802/src/ex_docmd.c      2019-01-22 22:41:38.362850472 +0100
--- src/ex_docmd.c      2019-01-24 13:28:50.018069901 +0100
***************
*** 11838,11846 ****
             * edit that buffer, to not lose folding information (:edit resets
             * folds in other buffers)
             */
!           if (fputs("if bufexists('", fd) < 0
                    || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
!                   || fputs("') | buffer ", fd) < 0
                    || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
                    || fputs(" | else | edit ", fd) < 0
                    || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
--- 11838,11846 ----
             * edit that buffer, to not lose folding information (:edit resets
             * folds in other buffers)
             */
!           if (fputs("if bufexists(\"", fd) < 0
                    || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
!                   || fputs("\") | buffer ", fd) < 0
                    || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
                    || fputs(" | else | edit ", fd) < 0
                    || ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
*** ../vim-8.1.0802/src/testdir/test_mksession.vim      2019-01-21 
23:03:45.718447626 +0100
--- src/testdir/test_mksession.vim      2019-01-24 13:30:48.257167620 +0100
***************
*** 426,430 ****
--- 426,444 ----
    call delete('Xtest_mks.out')
  endfunc
  
+ func Test_mksession_quote_in_filename()
+   let v:errmsg = ''
+   %bwipe!
+   split another
+   split x'y\"z
+   mksession! Xtest_mks_quoted.out
+   %bwipe!
+   source Xtest_mks_quoted.out
+   call assert_true(bufexists("x'y\"z"))
+ 
+   %bwipe!
+   call delete('Xtest_mks_quoted.out')
+ endfunc
+ 
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.1.0802/src/version.c       2019-01-24 12:31:40.756926525 +0100
--- src/version.c       2019-01-24 13:30:55.837110446 +0100
***************
*** 793,794 ****
--- 793,796 ----
  {   /* Add new patch number below this line */
+ /**/
+     803,
  /**/

-- 
Experience is what you get when you don't get what you want.

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui