aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-16 11:04:04 +0200
committerGitHub <noreply@github.com>2022-09-16 11:04:04 +0200
commit0c0071548b4b598dcc4f9836703b1a7b0dc7c007 (patch)
tree7cb339add16d4d5806b97dd34b38725c98b111f0 /src/nvim/message.c
parentb98de0e0e5df96cadbac9222ddb1caa463cea2f0 (diff)
parentb616458af90cc12ef7379d06c3ef1fde4958e62b (diff)
downloadrneovim-0c0071548b4b598dcc4f9836703b1a7b0dc7c007.tar.gz
rneovim-0c0071548b4b598dcc4f9836703b1a7b0dc7c007.tar.bz2
rneovim-0c0071548b4b598dcc4f9836703b1a7b0dc7c007.zip
Merge pull request #20213 from bfredl/redisplay
fix(messages): do not crash on cmdheight=0 and g< redisplay
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c5
1 files changed, 5 insertions, 0 deletions
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