forked from aniani/vim
patch 8.2.4851: compiler warning for uninitialized variable
Problem: Compiler warning for uninitialized variable. Solution: Use another variable to decide to restore option values.
This commit is contained in:
@@ -620,6 +620,7 @@ makeopens(
|
|||||||
int only_save_windows = TRUE;
|
int only_save_windows = TRUE;
|
||||||
int nr;
|
int nr;
|
||||||
int restore_size = TRUE;
|
int restore_size = TRUE;
|
||||||
|
int restore_height_width = FALSE;
|
||||||
win_T *wp;
|
win_T *wp;
|
||||||
char_u *sname;
|
char_u *sname;
|
||||||
win_T *edited_win = NULL;
|
win_T *edited_win = NULL;
|
||||||
@@ -887,6 +888,7 @@ makeopens(
|
|||||||
|| put_line(fd, "set winminwidth=0") == FAIL
|
|| put_line(fd, "set winminwidth=0") == FAIL
|
||||||
|| put_line(fd, "set winwidth=1") == FAIL)
|
|| put_line(fd, "set winwidth=1") == FAIL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
restore_height_width = TRUE;
|
||||||
}
|
}
|
||||||
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
|
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
|
||||||
goto fail;
|
goto fail;
|
||||||
@@ -979,7 +981,7 @@ makeopens(
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tab_firstwin->w_next != NULL)
|
if (restore_height_width)
|
||||||
{
|
{
|
||||||
// Restore 'winminheight' and 'winminwidth'.
|
// Restore 'winminheight' and 'winminwidth'.
|
||||||
if (put_line(fd, "let &winminheight = s:save_winminheight") == FAIL
|
if (put_line(fd, "let &winminheight = s:save_winminheight") == FAIL
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4851,
|
||||||
/**/
|
/**/
|
||||||
4850,
|
4850,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user