1
0
forked from aniani/vim

patch 8.1.0046: loading a session file fails if 'winheight' is big

Problem:    Loading a session file fails if 'winheight' is a big number.
Solution:   Set 'minwinheight' to zero at first.  Don't give an error when
            setting 'minwinheight' while 'winheight' is a big number.
            Fix using vertical splits. Fix setting 'minwinwidth'.
            (closes #2970)
This commit is contained in:
Bram Moolenaar
2018-06-12 16:49:30 +02:00
parent ae0f30b761
commit 1c3c10492a
5 changed files with 50 additions and 14 deletions

View File

@@ -8796,6 +8796,7 @@ set_num_option(
*/
if (pp == &p_wh || pp == &p_hh)
{
// 'winheight' and 'helpheight'
if (p_wh < 1)
{
errmsg = e_positive;
@@ -8821,10 +8822,9 @@ set_num_option(
win_setheight((int)p_hh);
}
}
/* 'winminheight' */
else if (pp == &p_wmh)
{
// 'winminheight'
if (p_wmh < 0)
{
errmsg = e_positive;
@@ -8839,6 +8839,7 @@ set_num_option(
}
else if (pp == &p_wiw)
{
// 'winwidth'
if (p_wiw < 1)
{
errmsg = e_positive;
@@ -8854,10 +8855,9 @@ set_num_option(
if (!ONE_WINDOW && curwin->w_width < p_wiw)
win_setwidth((int)p_wiw);
}
/* 'winminwidth' */
else if (pp == &p_wmw)
{
// 'winminwidth'
if (p_wmw < 0)
{
errmsg = e_positive;
@@ -8868,7 +8868,7 @@ set_num_option(
errmsg = e_winwidth;
p_wmw = p_wiw;
}
win_setminheight();
win_setminwidth();
}
/* (re)set last window status line */