fix(messages): clear new lines when increasing 'cmdheight' (#27421)

This commit is contained in:
zeertzjq
2024-02-11 18:12:56 +08:00
committed by GitHub
parent 170c890dca
commit ca258db156
3 changed files with 21 additions and 2 deletions

View File

@@ -210,7 +210,11 @@ void msg_grid_validate(void)
msg_grid_adj.target = &default_grid;
redraw_cmdline = true;
} else if (msg_grid.chars && !msg_scrolled && msg_grid_pos != max_rows) {
int diff = msg_grid_pos - max_rows;
msg_grid_set_pos(max_rows, false);
if (diff > 0) {
grid_clear(&msg_grid_adj, Rows - diff, Rows, 0, Columns, HL_ATTR(HLF_MSG));
}
}
msg_grid_adj.cols = Columns;