summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-12 16:49:30 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-12 16:49:30 +0200
commit1c3c10492a291270fa89b3c8df11828792f927d3 (patch)
treee644f87ac8716b7d9232f4ebe2d8610350397d4c /src/option.c
parentae0f30b761eb62e1b6bfc83fb4a6d1a47bf48320 (diff)
downloadvim-git-1c3c10492a291270fa89b3c8df11828792f927d3.tar.gz
patch 8.1.0046: loading a session file fails if 'winheight' is bigv8.1.0046
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)
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/option.c b/src/option.c
index 7d79b3ca1..0200b207c 100644
--- a/src/option.c
+++ b/src/option.c
@@ -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 */