diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-09-02 19:05:33 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-09-02 19:54:06 -0400 |
commit | c0cb7585cc6b9d408811b95bb5462789f5ca0207 (patch) | |
tree | ac7fbe4b657d960bd6babdfd8403930bf4a5170c /src/nvim/option.c | |
parent | 02f126a2758e834a7e9dfbae0ede48bf8b90512f (diff) | |
download | rneovim-c0cb7585cc6b9d408811b95bb5462789f5ca0207.tar.gz rneovim-c0cb7585cc6b9d408811b95bb5462789f5ca0207.tar.bz2 rneovim-c0cb7585cc6b9d408811b95bb5462789f5ca0207.zip |
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 vim/vim#2970)
https://github.com/vim/vim/commit/1c3c10492a291270fa89b3c8df11828792f927d3
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 6eeeca5068..ed9128dbbf 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4330,19 +4330,26 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, // Number options that need some action when changed if (pp == &p_wh) { + // 'winheight' if (!ONE_WINDOW && curwin->w_height < p_wh) { win_setheight((int)p_wh); } } else if (pp == &p_hh) { + // 'helpheight' if (!ONE_WINDOW && curbuf->b_help && curwin->w_height < p_hh) { win_setheight((int)p_hh); } } else if (pp == &p_wmh) { + // 'winminheight' win_setminheight(); } else if (pp == &p_wiw) { + // 'winwidth' if (!ONE_WINDOW && curwin->w_width < p_wiw) { win_setwidth((int)p_wiw); } + } else if (pp == &p_wmw) { + // 'winminwidth' + win_setminwidth(); } else if (pp == &p_ls) { last_status(false); // (re)set last window status line. } else if (pp == &p_stal) { |