diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-02-08 01:44:57 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-02-12 09:26:06 +0100 |
commit | c5173230f065d68fe261443a420fc87bd633c8e8 (patch) | |
tree | 3837b11c2ab2dd892485f665cf224cb680163de9 /src/nvim/ui_compositor.c | |
parent | 9b4383261a3de874969b7df89d32eaeb92ab8abf (diff) | |
download | rneovim-c5173230f065d68fe261443a420fc87bd633c8e8.tar.gz rneovim-c5173230f065d68fe261443a420fc87bd633c8e8.tar.bz2 rneovim-c5173230f065d68fe261443a420fc87bd633c8e8.zip |
UI: 'pumblend' for cterm (256-color TUI)
hl_rgb2cterm_color, hl_cterm2rgb_color were adapted from Vim 8.1
(color2index, cterm_color2rgb).
ref: https://github.com/vim/vim/commit/c5cd88554f1e0b2e9ff08d9a0748238dd8340ce1
Diffstat (limited to 'src/nvim/ui_compositor.c')
-rw-r--r-- | src/nvim/ui_compositor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c index 59ae9c34ec..c7ba0306e4 100644 --- a/src/nvim/ui_compositor.c +++ b/src/nvim/ui_compositor.c @@ -259,9 +259,10 @@ 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' if (grid != &default_grid && p_pb) { for (int i = col-(int)startcol; i < until-startcol; i++) { - bool thru = strequal((char *)linebuf[i], " "); + bool thru = strequal((char *)linebuf[i], " "); // negative space attrbuf[i] = (sattr_T)hl_blend_attrs(bg_attrs[i], attrbuf[i], thru); if (thru) { memcpy(linebuf[i], bg_line[i], sizeof(linebuf[i])); |