From b616458af90cc12ef7379d06c3ef1fde4958e62b Mon Sep 17 00:00:00 2001 From: bfredl Date: Fri, 16 Sep 2022 10:31:37 +0200 Subject: fix(messages): do not crash on cmdheight=0 and g< redisplay fixes #20153 --- src/nvim/message.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/nvim/message.c b/src/nvim/message.c index 8bcf5a552f..2751822322 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -2955,6 +2955,11 @@ static int do_more_prompt(int typed_char) } } else { // First display any text that we scrolled back. + // if p_ch=0 we need to allocate a line for "press enter" messages! + if (cmdline_row >= Rows && !ui_has(kUIMessages)) { + msg_scroll_up(true, false); + msg_scrolled++; + } while (toscroll > 0 && mp_last != NULL) { if (msg_do_throttle() && !msg_grid.throttled) { // Tricky: we redraw at one line higher than usual. Therefore -- cgit