diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-01 00:42:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-01 00:42:24 +0100 |
commit | b4011afe53ce2d065e49718b8c5b9974b7022f92 (patch) | |
tree | 799ae2751bae16542a617a10fcb09f35199e00ff /src/session.c | |
parent | d7c9564d8d24343f2e27205633032dd6ebe5232c (diff) | |
download | vim-git-b4011afe53ce2d065e49718b8c5b9974b7022f92.tar.gz |
patch 8.2.4851: compiler warning for uninitialized variablev8.2.4851
Problem: Compiler warning for uninitialized variable.
Solution: Use another variable to decide to restore option values.
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/session.c b/src/session.c index d91ae1981..795438cd8 100644 --- a/src/session.c +++ b/src/session.c @@ -620,6 +620,7 @@ makeopens( 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,6 +888,7 @@ makeopens( || 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,7 +981,7 @@ makeopens( goto fail; } - if (tab_firstwin->w_next != NULL) + if (restore_height_width) { // Restore 'winminheight' and 'winminwidth'. if (put_line(fd, "let &winminheight = s:save_winminheight") == FAIL |