--- config.def.h | 5 +++++ x.c | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index ca6b0db..9f47bca 100644 --- a/config.def.h +++ b/config.def.h _AT_@ -118,6 +118,11 @@ static const char *colorname[] = { */ unsigned int defaultfg = 7; unsigned int defaultbg = 0; +#define defaultcs 256 /* index or 'g.fg' */ +#define defaultrcs 257 /* index or 'g.bg' */ +/* Foreground color of cursor's Rune (when shape is Block or Snowman) */ +#define defaultcfg defaultbg /* index or 'g.bg' */ +#define defaultrcfg defaultfg /* index or 'g.fg' */ /* * Default shape of cursor diff --git a/x.c b/x.c index 4155a70..109ff67 100644 --- a/x.c +++ b/x.c _AT_@ -1420,13 +1420,16 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE; if (selected(cx, cy)) { - cc = g.bg; + cc = g.bg = defaultrcs; + g.fg = defaultrcfg; } else { g.mode |= ATTR_REVERSE; - if (g.mode & ATTR_BOLD && BETWEEN(g.fg, 0, 7)) - cc = g.fg + 8; - else - cc = g.fg; + if (g.mode & ATTR_BOLD && BETWEEN(g.fg, 0, 7)) { + g.mode |= ATTR_FAINT; + g.fg += 8; + } + cc = g.fg = defaultcs; + g.bg = defaultcfg; } if (IS_TRUECOL(cc)) { -- 2.18.0Received on Tue Jul 17 2018 - 22:58:40 CEST
This archive was generated by hypermail 2.3.0 : Tue Jul 17 2018 - 23:00:22 CEST