sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

st-spoiler-20180309-c5ba9c0.diff (425B)


      1 diff --git a/x.c b/x.c
      2 --- a/x.c
      3 +++ b/x.c
      4 @@ -1330,9 +1330,14 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
      5  	}
      6  
      7  	if (base.mode & ATTR_REVERSE) {
      8 -		temp = fg;
      9 -		fg = bg;
     10 -		bg = temp;
     11 +		if (bg == fg) {
     12 +			bg = &dc.col[defaultfg];
     13 +			fg = &dc.col[defaultbg];
     14 +		} else {
     15 +			temp = fg;
     16 +			fg = bg;
     17 +			bg = temp;
     18 +		}
     19  	}
     20  
     21  	if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK)