diff --git a/src/terminal.c b/src/terminal.c index 01cabf021f..c7dc23f904 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -2433,8 +2433,8 @@ color2index(VTermColor *color, int fg, int *boldp) if (color->ansi_index != VTERM_ANSI_INDEX_NONE) { /* First 16 colors and default: use the ANSI index, because these - * colors can be redefined. */ - if (t_colors >= 16) + * colors can be redefined, we use the RGB values. */ + if (t_colors > 256) return color->ansi_index; switch (color->ansi_index) { @@ -3604,6 +3604,7 @@ set_vterm_palette(VTerm *vterm, long_u *rgb) for (; index < 16; index++) { VTermColor color; + color.red = (unsigned)(rgb[index] >> 16); color.green = (unsigned)(rgb[index] >> 8) & 255; color.blue = (unsigned)rgb[index] & 255; diff --git a/src/version.c b/src/version.c index 394f89c278..cb20b885b3 100644 --- a/src/version.c +++ b/src/version.c @@ -771,6 +771,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1146, /**/ 1145, /**/