Patch 8.2.4851
Problem: Compiler warning for uninitialized variable.
Solution: Use another variable to decide to restore option values.
Files: src/session.c
*** ../vim-8.2.4850/src/session.c 2022-04-30 16:10:23.970106114 +0100
--- src/session.c 2022-05-01 00:32:26.487946216 +0100
***************
*** 620,625 ****
--- 620,626 ----
int only_save_windows = TRUE;
int nr;
int restore_size = TRUE;
+ int restore_height_width = FALSE;
win_T *wp;
char_u *sname;
win_T *edited_win = NULL;
***************
*** 887,892 ****
--- 888,894 ----
|| put_line(fd, "set winminwidth=0") == FAIL
|| put_line(fd, "set winwidth=1") == FAIL)
goto fail;
+ restore_height_width = TRUE;
}
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
goto fail;
***************
*** 979,985 ****
goto fail;
}
! if (tab_firstwin->w_next != NULL)
{
// Restore 'winminheight' and 'winminwidth'.
if (put_line(fd, "let &winminheight = s:save_winminheight") == FAIL
--- 981,987 ----
goto fail;
}
! if (restore_height_width)
{
// Restore 'winminheight' and 'winminwidth'.
if (put_line(fd, "let &winminheight = s:save_winminheight") == FAIL
*** ../vim-8.2.4850/src/version.c 2022-04-30 16:10:23.970106114 +0100
--- src/version.c 2022-05-01 00:40:14.287043626 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4851,
/**/
--
From "know your smileys":
(:-# Said something he shouldn't have
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///