Fix the cursor color when over selection.
authorQuentin Rameau <quinq@fifth.space>
Mon, 5 Oct 2015 21:10:48 +0000 (23:10 +0200)
committerChristoph Lohmann <20h@r-36.net>
Mon, 5 Oct 2015 22:05:04 +0000 (00:05 +0200)
If we want to show a custom selected cursor color, we must not set the
revert attribute to the drawn glyph.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
st.c

diff --git a/st.c b/st.c
index 4ead319..d9f0ba6 100644 (file)
--- a/st.c
+++ b/st.c
@@ -3852,7 +3852,8 @@ xdrawcursor(void)
        g.u = term.line[term.c.y][term.c.x].u;
        if (ena_sel && selected(term.c.x, term.c.y)) {
                drawcol = dc.col[defaultrcs];
-               g.mode ^= ATTR_REVERSE;
+               g.fg = defaultfg;
+               g.bg = defaultrcs;
        } else {
                drawcol = dc.col[defaultcs];
        }