Skip to content

Commit

Permalink
fix(x: xdrawglyphfontspecs): fix bg of reversed text (#156)
Browse files Browse the repository at this point in the history
* fix(x: xdrawglyphfontspecs): fix bg of reversed text

* fixup! fix(x: xdrawglyphfontspecs): fix bg of reversed text
  • Loading branch information
actionless authored May 4, 2023
1 parent 25e20c9 commit bf14013
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,8 +2060,14 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
}

if (base.mode & ATTR_REVERSE) {
bg = &dc.col[defaultbg_reverse];
fg = &dc.col[defaultfg_reverse];
if (bg == fg) {
bg = &dc.col[defaultfg_reverse];
fg = &dc.col[defaultbg_reverse];
} else {
temp = fg;
fg = bg;
bg = temp;
}
}

if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK)
Expand Down

0 comments on commit bf14013

Please sign in to comment.