[haiku-commits] Re: haiku: hrev45143 - src/apps/terminal

  • From: Sean Bailey <ziusudra@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 9 Jan 2013 19:31:05 -0700

>
> -                                                       case 1: /* Bold
>   */
> -                                                       case 5:
> -                                                               fAttr |=
> BOLD;
> +                                                       case 1: /* Bright
> / Bold     */
> +                                                               fAttr |=
> FORECOLORED(8);
> +                                                               fAttr |=
> FORESET;


I do think case 1 should be bright instead of bold, but it would be best to
handle that in TermView.cpp rather than here. Consider this:
"\E[22m\E38;5;14mSomeText\E[5mMoreText\E0m" (those escape codes are: bold
off, color 14, color 5, default color/style) the MoreText should be color 5
but with this commit will be color 13.


>                                                         case 37:
> -                                                               fAttr &=
> ~FORECOLOR;
> +                                                               fAttr &=
> ~FORECOLORED(7);
>

This should either be "fAttr &= ~FORECOLORED(255 - 8);" or left as it was.
If for example the color was set to 240 and the code for color 7 was given,
after this the color would be set to 247 rather than the requested 7.


> +++ b/src/apps/terminal/TermView.cpp
> @@ -79,14 +79,14 @@ static rgb_color kTermColorTable[256] = {
>         {  6, 152, 154, 0},     // cyan
>         {245, 245, 245, 0},     // white
>

If we're going to use color 15 as light-gray than the above should be
changed to 255,255,255. Though it would be better to make 7 the light-gray
and 15 the white like xterms do and change any color scheme that is using
color 7 to use color 15 and change any FORECOLORED(7) to FORECOLORED(15).

-       {128, 128, 128, 0},     // black
> +       { 64,  64,  64, 0},     // black
>


> -       {255, 255, 255, 0},     // white
> +       {128, 128, 128, 0},     // white
>

These changes are rather dark when using a dark background. I'd like to
have all of the colors in a settings file rather than hard-coded.

Other related posts: