1
0
forked from aniani/vim

patch 8.2.2594: alternate buffer added to session file even when it's hidden

Problem:    Alternate buffer added to session file even when it's hidden.
Solution:   Check the 'buflisted' option. (closes #7951)
This commit is contained in:
Bram Moolenaar
2021-03-13 13:52:33 +01:00
parent 0de8e2d6a3
commit 0756f757ed
3 changed files with 18 additions and 1 deletions

View File

@@ -401,11 +401,12 @@ put_view(
{
buf_T *alt = buflist_findnr(wp->w_alt_fnum);
// Set the alternate file.
// Set the alternate file if the buffer is listed.
if ((flagp == &ssop_flags)
&& alt != NULL
&& alt->b_fname != NULL
&& *alt->b_fname != NUL
&& alt->b_p_bl
&& (fputs("balt ", fd) < 0
|| ses_fname(fd, alt, flagp, TRUE) == FAIL))
return FAIL;