diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-29 22:33:38 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-29 22:33:38 +0100 |
commit | 46359e198f6d6884dc3d3c4a3e46625f1b2a2ad2 (patch) | |
tree | da9e14023d7dd0714922483de9f31d0522c8a017 /src/libvterm/include | |
parent | 8b9e20afb0da79a21155988a38704b5777cc2efe (diff) | |
download | vim-git-46359e198f6d6884dc3d3c4a3e46625f1b2a2ad2.tar.gz |
patch 8.0.1359: libvterm ANSI colors can not always be recognizedv8.0.1359
Problem: Libvterm ANSI colors can not always be recognized from the RGB
values. The default color is wrong when t_RB is empty.
Solution: Add the ANSI color index to VTermColor.
Diffstat (limited to 'src/libvterm/include')
-rw-r--r-- | src/libvterm/include/vterm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libvterm/include/vterm.h b/src/libvterm/include/vterm.h index 50a840a31..f731dcb8b 100644 --- a/src/libvterm/include/vterm.h +++ b/src/libvterm/include/vterm.h @@ -79,8 +79,16 @@ INLINE void vterm_rect_move(VTermRect *rect, int row_delta, int col_delta) } #endif +/* The ansi_index is used for the lower 16 colors, which can be set to any + * color. */ +#define VTERM_ANSI_INDEX_DEFAULT 0 /* color cleared */ +#define VTERM_ANSI_INDEX_MIN 1 +#define VTERM_ANSI_INDEX_MAX 16 +#define VTERM_ANSI_INDEX_NONE 255 /* non-ANSI color, use red/green/blue */ + typedef struct { uint8_t red, green, blue; + uint8_t ansi_index; } VTermColor; typedef enum { |