st-spoiler-20160727-308bfbf.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       st-spoiler-20160727-308bfbf.diff (457B)
       ---
            1 diff --git a/st.c b/st.c
            2 index 2594c65..742bc5c 100644
            3 --- a/st.c
            4 +++ b/st.c
            5 @@ -3748,9 +3748,14 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
            6          }
            7  
            8          if (base.mode & ATTR_REVERSE) {
            9 -                temp = fg;
           10 -                fg = bg;
           11 -                bg = temp;
           12 +                if (bg == fg) {
           13 +                        bg = &dc.col[defaultfg];
           14 +                        fg = &dc.col[defaultbg];
           15 +                } else {
           16 +                        temp = fg;
           17 +                        fg = bg;
           18 +                        bg = temp;
           19 +                }
           20          }
           21  
           22          if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) {