aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-09-03 19:05:06 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-06 19:12:41 +0200
commitd04a43fcaf2d7df46de1ea085dd12377f1fdeba0 (patch)
tree88210bca7aad0b60b8c75297202aecbd335d644f /src/nvim/message.c
parent1a783b5ad66fb021a83b23672e34e85ee2d8b20b (diff)
downloadrneovim-d04a43fcaf2d7df46de1ea085dd12377f1fdeba0.tar.gz
rneovim-d04a43fcaf2d7df46de1ea085dd12377f1fdeba0.tar.bz2
rneovim-d04a43fcaf2d7df46de1ea085dd12377f1fdeba0.zip
messages: fix cut lines in scrollback upon overflow
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 1ae2617767..046fa06b9d 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -2465,10 +2465,6 @@ static msgchunk_T *disp_sb_line(int row, msgchunk_T *smp)
mp = mp->sb_next;
}
- if (msg_col < Columns) {
- grid_fill(&msg_grid_adj, row, row+1, msg_col, Columns, ' ', ' ',
- HL_ATTR(HLF_MSG));
- }
return mp->sb_next;
}
@@ -2700,12 +2696,16 @@ static int do_more_prompt(int typed_char)
if (toscroll == -1) {
grid_ins_lines(&msg_grid_adj, 0, 1, Rows, 0, Columns);
+ grid_fill(&msg_grid_adj, 0, 1, 0, Columns, ' ', ' ',
+ HL_ATTR(HLF_MSG));
// display line at top
(void)disp_sb_line(0, mp);
} else {
// redisplay all lines
// TODO(bfredl): this case is not optimized (though only concerns
// event fragmentization, not unnecessary scroll events).
+ grid_fill(&msg_grid_adj, 0, Rows, 0, Columns, ' ', ' ',
+ HL_ATTR(HLF_MSG));
for (i = 0; mp != NULL && i < Rows - 1; i++) {
mp = disp_sb_line(i, mp);
++msg_scrolled;