Ken Takata wrote:

> I also noticed that the colors on Cygwin + mintty with 256-color mode are
> wrong since 8.1.1146.  Especially, yellow becomes brown.
> The following patch seems to fix the problem:
> 
> --- a/src/terminal.c
> +++ b/src/terminal.c
> @@ -2432,6 +2432,8 @@ color2index(VTermColor *color, int fg, i
>  
>      if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
>      {
> +     if (t_colors == 256)
> +        return color->ansi_index;
>       // The first 16 colors and default: use the ANSI index.
>       switch (color->ansi_index)
>       {

That is not correct, because this lookup is for the first 16 colors,
which are always translated this way, no matter if using 16, 88 or 256
colors.

There might be another condition when the lookup should not happen.
Perhaps it should only be done for xterm?

-- 
OLD WOMAN: King of the WHO?
ARTHUR:    The Britons.
OLD WOMAN: Who are the Britons?
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201905141557.x4EFvehX015727%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui