aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorShougo <Shougo.Matsu@gmail.com>2022-07-01 10:59:50 +0900
committerGitHub <noreply@github.com>2022-06-30 18:59:50 -0700
commit5a490d838ed3288abcf45e16e6ab79c326a67c17 (patch)
treed6084fc7aec13c4324404bb0886ad907c8446ed3 /src/nvim/message.c
parent3b1423bfa7adc5381af641a6e66fa2ca385ecab4 (diff)
downloadrneovim-5a490d838ed3288abcf45e16e6ab79c326a67c17.tar.gz
rneovim-5a490d838ed3288abcf45e16e6ab79c326a67c17.tar.bz2
rneovim-5a490d838ed3288abcf45e16e6ab79c326a67c17.zip
cmdheight=0: fix bugs #18961
Continue of #16251 Fix #18953 Fix #18960 Fix #18958 Fix #18955 Fix #18970 Fix #18983 Fix #18995 Fix #19112
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 733b4808fe..0cd323c234 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -891,7 +891,7 @@ char_u *msg_may_trunc(bool force, char_u *s)
room = (Rows - cmdline_row - 1) * Columns + sc_col - 1;
if ((force || (shortmess(SHM_TRUNC) && !exmode_active))
- && (int)STRLEN(s) - room > 0) {
+ && (int)STRLEN(s) - room > 0 && p_ch > 0) {
int size = vim_strsize((char *)s);
// There may be room anyway when there are multibyte chars.
@@ -3083,10 +3083,11 @@ void msg_clr_eos_force(void)
msg_row = msg_grid_pos;
}
- grid_fill(&msg_grid_adj, msg_row, msg_row + 1, msg_startcol, msg_endcol,
- ' ', ' ', HL_ATTR(HLF_MSG));
if (p_ch > 0) {
- grid_fill(&msg_grid_adj, msg_row + 1, Rows, 0, Columns, ' ', ' ', HL_ATTR(HLF_MSG));
+ grid_fill(&msg_grid_adj, msg_row, msg_row + 1, msg_startcol, msg_endcol,
+ ' ', ' ', HL_ATTR(HLF_MSG));
+ grid_fill(&msg_grid_adj, msg_row + 1, Rows, 0, Columns,
+ ' ', ' ', HL_ATTR(HLF_MSG));
}
redraw_cmdline = true; // overwritten the command line