From 2a2d2882287c27f29dbe50ccee7973efd27c678f Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Wed, 26 Jun 2019 08:29:06 +0200 Subject: compositor: handle scrolling of blended window --- src/nvim/ui_compositor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c index 0c3e771eb8..d12a411019 100644 --- a/src/nvim/ui_compositor.c +++ b/src/nvim/ui_compositor.c @@ -329,7 +329,7 @@ static void compose_line(Integer row, Integer startcol, Integer endcol, memcpy(linebuf+(col-startcol), grid->chars+off, n * sizeof(*linebuf)); memcpy(attrbuf+(col-startcol), grid->attrs+off, n * sizeof(*attrbuf)); - // 'pumblend' + // 'pumblend' and 'winblend' if (grid->blending) { for (int i = col-(int)startcol; i < until-startcol; i++) { bool thru = strequal((char *)linebuf[i], " "); // negative space @@ -467,7 +467,8 @@ static void ui_comp_grid_scroll(UI *ui, Integer grid, Integer top, bot += curgrid->comp_row; left += curgrid->comp_col; right += curgrid->comp_col; - if (!msg_scroll_mode && kv_size(layers) > curgrid->comp_index+1) { + bool covered = kv_size(layers) > curgrid->comp_index+1 || curgrid->blending; + if (!msg_scroll_mode && covered) { // TODO(bfredl): // 1. check if rectangles actually overlap // 2. calulate subareas that can scroll. -- cgit