Mercurial > vim
diff src/term.c @ 20500:03826c672315 v8.2.0804
patch 8.2.0804: libvterm code lags behind the upstream version
Commit: https://github.com/vim/vim/commit/e5886ccb5163873dd01fc67b09ab10e681351ee9
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 21 20:10:04 2020 +0200
patch 8.2.0804: libvterm code lags behind the upstream version
Problem: Libvterm code lags behind the upstream version.
Solution: Include revision 727, but add the index instead of switching
between RGB and indexed.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 May 2020 20:15:04 +0200 |
parents | d5d89c24eec7 |
children | bed30e6b5a09 |
line wrap: on
line diff
--- 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_ *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_ *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