mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
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)
1c3c10492a
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user