fix(cmdline): don't send invalid cursor with incsearch and cmdheight=0

fixes #20306
This commit is contained in:
bfredl
2022-09-26 11:40:06 +02:00
parent fe045bfd5f
commit be72af2f9b
3 changed files with 51 additions and 6 deletions

View File

@@ -1399,13 +1399,15 @@ void msg_start(void)
msg_clr_eos();
}
// if cmdheight=0, we need to scroll in the first line of msg_grid upon the screen
if (p_ch == 0 && !ui_has(kUIMessages) && !msg_scrolled) {
msg_grid_validate();
msg_scroll_up(false, true);
msg_scrolled++;
cmdline_row = Rows - 1;
}
if (!msg_scroll && full_screen) { // overwrite last message
if (cmdline_row >= Rows && !ui_has(kUIMessages)) {
msg_grid_validate();
msg_scroll_up(false, true);
msg_scrolled++;
cmdline_row = Rows - 1;
}
msg_row = cmdline_row;
msg_col = cmdmsg_rl ? Columns - 1 : 0;
} else if (msg_didout || (p_ch == 0 && !ui_has(kUIMessages))) { // start message on next line