]> git.armaanb.net Git - st.git/blobdiff - x.c
Apply ATTR_REVERSE after ATTR_FAINT
[st.git] / x.c
diff --git a/x.c b/x.c
index 191e5dc7a4652088c878dab30375ff33b08cf93d..474d73b3c9acd18992cc9a16fe4eeb05d944e39e 100644 (file)
--- 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;