Patch 8.2.2467
Problem: Script generated by :mkview changes alternate file.
Solution: Only write :balt in the session file. (Harish Rajagopal,
closes #7779)
Files: src/session.c, src/testdir/test_mksession.vim
*** ../vim-8.2.2466/src/session.c 2020-11-27 11:00:34.994467828 +0100
--- src/session.c 2021-02-05 21:52:34.088685836 +0100
***************
*** 402,408 ****
buf_T *alt = buflist_findnr(wp->w_alt_fnum);
// Set the alternate file.
! if (alt != NULL
&& alt->b_fname != NULL
&& *alt->b_fname != NUL
&& (fputs("balt ", fd) < 0
--- 402,409 ----
buf_T *alt = buflist_findnr(wp->w_alt_fnum);
// Set the alternate file.
! if ((flagp == &ssop_flags)
! && alt != NULL
&& alt->b_fname != NULL
&& *alt->b_fname != NUL
&& (fputs("balt ", fd) < 0
*** ../vim-8.2.2466/src/testdir/test_mksession.vim 2021-02-01 19:24:52.066907936 +0100
--- src/testdir/test_mksession.vim 2021-02-05 21:55:19.620097325 +0100
***************
*** 530,535 ****
--- 530,549 ----
%bwipe
endfunc
+ func Test_mkview_no_balt()
+ edit Xtestfile1
+ edit Xtestfile2
+
+ mkview! Xtestview
+ bdelete Xtestfile1
+
+ source Xtestview
+ call assert_equal(0, buflisted('Xtestfile1'))
+
+ call delete('Xtestview')
+ %bwipe
+ endfunc
+
" Test :mkview with a file argument.
func Test_mkview_file()
" Create a view with line number and a fold.
*** ../vim-8.2.2466/src/version.c 2021-02-04 22:07:13.460979948 +0100
--- src/version.c 2021-02-05 21:55:34.104045251 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2467,
/**/
--
What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
meaning 'bloodsucking creatures'.
/// Bram Moolenaar -- Br...@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 ///