On Tue, Jul 17, 2018 at 08:05:01PM +0200, g...@suckless.org wrote:
> commit 4f4bccd1627c845330235721f593d2e93418723d
> Author:     Hiltjo Posthuma <hil...@codemadness.org>
> AuthorDate: Tue Jul 17 20:01:58 2018 +0200
> Commit:     Hiltjo Posthuma <hil...@codemadness.org>
> CommitDate: Tue Jul 17 20:01:58 2018 +0200
> 
>     Revert "Simplify cursor color handling"
>     
>     This reverts commit 1911c9274d9b03f3d7999c6ce26e2d5169642d26.
> 
> diff --git a/x.c b/x.c
> index ffd005f..00cb6b1 100644
> --- a/x.c
> +++ b/x.c
> @@ -1418,19 +1418,25 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, 
> Glyph og)
>        */
>       g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE;
>  
> -     if (selected(cx, cy)) {
> -             g.bg = defaultrcs;
> -             g.fg = defaultfg;
> -     } else {
> -             g.bg = defaultcs;
> -             g.fg = defaultbg;
> -     }
> -     drawcol = dc.col[g.bg];
> -
>       if (IS_SET(MODE_REVERSE)) {
> -             drawcol.color.red = ~drawcol.color.red;
> -             drawcol.color.green = ~drawcol.color.green;
> -             drawcol.color.blue = ~drawcol.color.blue;
> +             g.mode |= ATTR_REVERSE;
> +             g.bg = defaultfg;
> +             if (selected(cx, cy)) {
> +                     drawcol = dc.col[defaultcs];
> +                     g.fg = defaultrcs;
> +             } else {
> +                     drawcol = dc.col[defaultrcs];
> +                     g.fg = defaultcs;
> +             }
> +     } else {
> +             if (selected(cx, cy)) {
> +                     g.fg = defaultfg;
> +                     g.bg = defaultrcs;
> +             } else {
> +                     g.fg = defaultbg;
> +                     g.bg = defaultcs;
> +             }
> +             drawcol = dc.col[g.bg];
>       }
>  
>       /* draw the new one */
> 

Hi,

I've reverted the cursor patches.

To clarify: the last 3 patches introduced regressions and inconsistencies vs
xterm and other terminals.

For example underline text color broke: printf '\e[4 q'
Also reverse highlighting of text, like tmux text selector or editor bracket 
highlight.
I could not reproduce the truecolor font crash either.

Thanks von, dok and quinq for reporting it.

-- 
Kind regards,
Hiltjo

Reply via email to