diff --git a/config.def.h b/config.def.h index fd09d72..593e50b 100644 --- a/config.def.h +++ b/config.def.h @@ -104,7 +104,9 @@ static const char *colorname[] = { static unsigned int defaultfg = 7; static unsigned int defaultbg = 0; static unsigned int defaultcs = 256; -static unsigned int defaultrcs = 257; +static unsigned int defaultrcs = 15; +static unsigned int defaultselfg = 15; +static unsigned int defaultselbg = 257; /* * Default shape of cursor @@ -416,4 +418,3 @@ static Key key[] = { static uint selmasks[] = { [SEL_RECTANGULAR] = Mod1Mask, }; - diff --git a/st.c b/st.c index 0536b6f..75a3b08 100644 --- a/st.c +++ b/st.c @@ -3852,7 +3852,7 @@ xdrawcursor(void) /* remove the old cursor */ og = term.line[oldy][oldx]; if (ena_sel && selected(oldx, oldy)) - og.mode ^= ATTR_REVERSE; + og.bg = defaultselbg; xdrawglyph(og, oldx, oldy); g.u = term.line[term.c.y][term.c.x].u; @@ -3994,8 +3994,10 @@ drawregion(int x1, int y1, int x2, int y2) new = term.line[y][x]; if (new.mode == ATTR_WDUMMY) continue; - if (ena_sel && selected(x, y)) - new.mode ^= ATTR_REVERSE; + if (ena_sel && selected(x, y)) { + new.fg = defaultselfg; + new.bg = defaultselbg; + } if (i > 0 && ATTRCMP(base, new)) { xdrawglyphfontspecs(specs, base, i, ox, y); specs += i; @@ -4412,4 +4414,3 @@ run: return 0; } -