X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=x.c;h=474d73b3c9acd18992cc9a16fe4eeb05d944e39e;hb=e829e13bb1a830e0cdce749ea0865cd93af1846c;hp=191e5dc7a4652088c878dab30375ff33b08cf93d;hpb=c1d23afa9c44cc29818c538126790ae90a64a3c5;p=st.git diff --git a/x.c b/x.c index 191e5dc..474d73b 100644 --- a/x.c +++ b/x.c @@ -1189,12 +1189,6 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i } } - if (base.mode & ATTR_REVERSE) { - temp = fg; - fg = bg; - bg = temp; - } - if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) { colfg.red = fg->color.red / 2; colfg.green = fg->color.green / 2; @@ -1203,6 +1197,13 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i fg = &revfg; } + + if (base.mode & ATTR_REVERSE) { + temp = fg; + fg = bg; + bg = temp; + } + if (base.mode & ATTR_BLINK && term.mode & MODE_BLINK) fg = bg;