aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2018-07-17 20:01:57 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2018-07-17 20:01:57 +0200
commit8ed7a4b3b755407a7724a586ef224051bc306f4f (patch)
treea5d459ad19403dd4e4ca086ec6d98917880a0e62 /x.c
parent732be223ee7ba5486713c63f944699fd6285af96 (diff)
downloadst-patched-8ed7a4b3b755407a7724a586ef224051bc306f4f.tar.bz2
st-patched-8ed7a4b3b755407a7724a586ef224051bc306f4f.tar.xz
st-patched-8ed7a4b3b755407a7724a586ef224051bc306f4f.zip
Revert "Make cursor follow text color"
This reverts commit b51bcd5553af3db394014efbd78acf7828fa48ff.
Diffstat (limited to 'x.c')
-rw-r--r--x.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/x.c b/x.c
index b51821d..ffd005f 100644
--- a/x.c
+++ b/x.c
@@ -1419,15 +1419,13 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
1419 g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE; 1419 g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE;
1420 1420
1421 if (selected(cx, cy)) { 1421 if (selected(cx, cy)) {
1422 drawcol = dc.col[g.bg]; 1422 g.bg = defaultrcs;
1423 g.fg = defaultfg;
1423 } else { 1424 } else {
1424 g.mode |= ATTR_REVERSE; 1425 g.bg = defaultcs;
1425 1426 g.fg = defaultbg;
1426 if (g.mode & ATTR_BOLD && BETWEEN(g.fg, 0, 7))
1427 drawcol = dc.col[g.fg + 8];
1428 else
1429 drawcol = dc.col[g.fg];
1430 } 1427 }
1428 drawcol = dc.col[g.bg];
1431 1429
1432 if (IS_SET(MODE_REVERSE)) { 1430 if (IS_SET(MODE_REVERSE)) {
1433 drawcol.color.red = ~drawcol.color.red; 1431 drawcol.color.red = ~drawcol.color.red;