From 951034614110cf2e4388645ee17ed4a315d0d382 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 24 Nov 2023 06:13:24 +0800 Subject: vim-patch:9.0.2125: File info disappears when 'cmdheight' has decreased (#26180) Problem: File info disappears immediately when 'cmdheight' has just decreased due to switching tabpage and 'shortmess' doesn't contain 'o' or 'O'. Solution: Make sure msg_row isn't smaller than cmdline_row. fixes: vim/vim#13560 closes: vim/vim#13561 https://github.com/vim/vim/commit/40ed6711bd385051021691980e8ce16375b4b510 --- src/nvim/message.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/message.c b/src/nvim/message.c index d9f9c26243..2ff0172ac4 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1395,7 +1395,11 @@ void msg_ext_set_kind(const char *msg_kind) /// Prepare for outputting characters in the command line. void msg_start(void) { - int did_return = false; + bool did_return = false; + + if (msg_row < cmdline_row) { + msg_row = cmdline_row; + } if (!msg_silent) { XFREE_CLEAR(keep_msg); // don't display old message now -- cgit