aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-06-26 08:29:06 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-06-26 08:37:36 +0200
commit2a2d2882287c27f29dbe50ccee7973efd27c678f (patch)
tree544c60807114c158e9244ff5acd10f0528a9ff8f /src
parent10c983fabeae6f2cda93404f3aa4ee814baa43f3 (diff)
downloadrneovim-2a2d2882287c27f29dbe50ccee7973efd27c678f.tar.gz
rneovim-2a2d2882287c27f29dbe50ccee7973efd27c678f.tar.bz2
rneovim-2a2d2882287c27f29dbe50ccee7973efd27c678f.zip
compositor: handle scrolling of blended window
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ui_compositor.c5
1 files changed, 3 insertions, 2 deletions
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.