vim-patch:8.2.2467: script generated by :mkview changes alternate file

Problem:    Script generated by :mkview changes alternate file.
Solution:   Only write :balt in the session file. (Harish Rajagopal,
            closes vim/vim#7779)
139348f3e8
This commit is contained in:
Sean Dewar
2021-02-11 03:42:15 +00:00
parent add0cf9a42
commit 4bc82a59b6
2 changed files with 16 additions and 1 deletions

View File

@@ -388,7 +388,8 @@ static int put_view(
buf_T *const alt = buflist_findnr(wp->w_alt_fnum);
// Set the alternate file.
if (alt != NULL && alt->b_fname != NULL && *alt->b_fname != NUL
if ((flagp == &ssop_flags) && alt != NULL && alt->b_fname != NULL
&& *alt->b_fname != NUL
&& (fputs("balt ", fd) < 0
|| ses_fname(fd, alt, flagp, true) == FAIL)) {
return FAIL;