st-spoiler-0.6.diff (455B)
1 diff --git a/st.c b/st.c 2 index b89d094..88c78f5 100644 3 --- a/st.c 4 +++ b/st.c 5 @@ -3483,9 +3483,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) {