aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-11 18:12:56 +0800
committerGitHub <noreply@github.com>2024-02-11 18:12:56 +0800
commitca258db15668242c50a0529111398f53e4e01619 (patch)
tree219470b191255ae9e17b9fe45797ed634ba6af16 /src
parent170c890dca8f160bdcd41e4fdc6bf15ee0bdba49 (diff)
downloadrneovim-ca258db15668242c50a0529111398f53e4e01619.tar.gz
rneovim-ca258db15668242c50a0529111398f53e4e01619.tar.bz2
rneovim-ca258db15668242c50a0529111398f53e4e01619.zip
fix(messages): clear new lines when increasing 'cmdheight' (#27421)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/message.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 991ed65ffe..d879fa1423 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -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;