aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui_compositor.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-04-17 22:22:26 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-06-25 18:08:21 +0200
commit4c4d964eeb8d49a305306761eea406e1829b31ac (patch)
treeef3e0e9de2d022a1a96d59409813ef25f0341acc /src/nvim/ui_compositor.c
parent027ebb23da0868655413e1850eb0b7d77e223850 (diff)
downloadrneovim-4c4d964eeb8d49a305306761eea406e1829b31ac.tar.gz
rneovim-4c4d964eeb8d49a305306761eea406e1829b31ac.tar.bz2
rneovim-4c4d964eeb8d49a305306761eea406e1829b31ac.zip
ui: add 'winblend' to support blending of floating windows
Also add `hi blend=` attribute to override transparency of indiviual attributes.
Diffstat (limited to 'src/nvim/ui_compositor.c')
-rw-r--r--src/nvim/ui_compositor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c
index f6573e7488..0c3e771eb8 100644
--- a/src/nvim/ui_compositor.c
+++ b/src/nvim/ui_compositor.c
@@ -330,10 +330,10 @@ static void compose_line(Integer row, Integer startcol, Integer endcol,
memcpy(attrbuf+(col-startcol), grid->attrs+off, n * sizeof(*attrbuf));
// 'pumblend'
- if (grid == &pum_grid && p_pb) {
+ if (grid->blending) {
for (int i = col-(int)startcol; i < until-startcol; i++) {
bool thru = strequal((char *)linebuf[i], " "); // negative space
- attrbuf[i] = (sattr_T)hl_blend_attrs(bg_attrs[i], attrbuf[i], thru);
+ attrbuf[i] = (sattr_T)hl_blend_attrs(bg_attrs[i], attrbuf[i], &thru);
if (thru) {
memcpy(linebuf[i], bg_line[i], sizeof(linebuf[i]));
}
@@ -419,7 +419,7 @@ static void ui_comp_raw_line(UI *ui, Integer grid, Integer row,
assert(clearcol <= default_grid.Columns);
if (flags & kLineFlagInvalid
|| kv_size(layers) > curgrid->comp_index+1
- || (p_pb && curgrid == &pum_grid)) {
+ || curgrid->blending) {
compose_line(row, startcol, clearcol, flags);
} else {
ui_composed_call_raw_line(1, row, startcol, endcol, clearcol, clearattr,