diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-21 20:10:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-21 20:10:04 +0200 |
commit | e5886ccb5163873dd01fc67b09ab10e681351ee9 (patch) | |
tree | fdcd614ffefec6fac5d9229b046961a101d17f15 /src/term.c | |
parent | 83a52533b23c88f90be0dea01bc5e32ddadc1d6a (diff) |
patch 8.2.0804: libvterm code lags behind the upstream versionv8.2.0804
Problem: Libvterm code lags behind the upstream version.
Solution: Include revision 727, but add the index instead of switching
between RGB and indexed.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/term.c b/src/term.c index 11972a15b0..e79fa5eb2a 100644 --- a/src/term.c +++ b/src/term.c @@ -6357,12 +6357,6 @@ static int grey_ramp[] = { 0x80, 0x8A, 0x94, 0x9E, 0xA8, 0xB2, 0xBC, 0xC6, 0xD0, 0xDA, 0xE4, 0xEE }; -# ifdef FEAT_TERMINAL -# include "libvterm/include/vterm.h" // for VTERM_ANSI_INDEX_NONE -# else -# define VTERM_ANSI_INDEX_NONE 0 -# endif - static char_u ansi_table[16][4] = { // R G B idx { 0, 0, 0, 1}, // black @@ -6384,6 +6378,8 @@ static char_u ansi_table[16][4] = { {255, 255, 255, 16}, // white }; +#define ANSI_INDEX_NONE 0 + void cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx) { @@ -6403,7 +6399,7 @@ cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx) *r = cube_value[idx / 36 % 6]; *g = cube_value[idx / 6 % 6]; *b = cube_value[idx % 6]; - *ansi_idx = VTERM_ANSI_INDEX_NONE; + *ansi_idx = ANSI_INDEX_NONE; } else if (nr < 256) { @@ -6412,14 +6408,14 @@ cterm_color2rgb(int nr, char_u *r, char_u *g, char_u *b, char_u *ansi_idx) *r = grey_ramp[idx]; *g = grey_ramp[idx]; *b = grey_ramp[idx]; - *ansi_idx = VTERM_ANSI_INDEX_NONE; + *ansi_idx = ANSI_INDEX_NONE; } else { *r = 0; *g = 0; *b = 0; - *ansi_idx = 0; + *ansi_idx = ANSI_INDEX_NONE; } } #endif |