diff --git a/src/optionstr.c b/src/optionstr.c index 72f5dd3ced..0390d2dac7 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -4384,6 +4384,10 @@ expand_set_spellsuggest(optexpand_T *args, int *numMatches, char_u ***matches) char * did_set_splitkeep(optset_T *args UNUSED) { + win_T *wp; + tabpage_T *tp; + FOR_ALL_TAB_WINDOWS(tp, wp) + wp->w_prev_height = wp->w_height; return did_set_opt_strings(p_spk, p_spk_values, FALSE); } diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim index 98e9ba83db..b1305c77e1 100644 --- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -1992,6 +1992,16 @@ func Test_splitkeep_screen_cursor_pos() set splitkeep& endfunc +func Test_splitkeep_cmdheight() + set splitkeep=screen + call setline(1, range(&lines)) + norm! G + set cmdheight=2 + call assert_equal(&lines - 1, line('.')) + %bwipeout! + set splitkeep& cmdheight& +endfunc + func Test_splitkeep_cursor() CheckScreendump let lines =<< trim END diff --git a/src/version.c b/src/version.c index 778a227b7a..824a80de9c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 413, /**/ 412, /**/ diff --git a/src/window.c b/src/window.c index c3acd7af33..8813ffa808 100644 --- a/src/window.c +++ b/src/window.c @@ -7591,6 +7591,7 @@ command_height(void) } if (p_ch < old_p_ch && command_frame_height && frp != NULL) frame_add_height(frp, (int)(old_p_ch - p_ch)); + win_fix_scroll(true); // Recompute window positions. win_comp_pos();