cmdheight=0: fix bugs #18961

Continue of #16251

Fix #18953
Fix #18960
Fix #18958
Fix #18955
Fix #18970
Fix #18983
Fix #18995
Fix #19112
This commit is contained in:
Shougo
2022-07-01 10:59:50 +09:00
committed by GitHub
parent 3b1423bfa7
commit 5a490d838e
7 changed files with 106 additions and 12 deletions

View File

@@ -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