Introduction
Introduction Statistics Contact Development Disclaimer Help
tRevert "Make cursor follow text color" - st - [fork] customized build of st, t…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 8ed7a4b3b755407a7724a586ef224051bc306f4f
parent 732be223ee7ba5486713c63f944699fd6285af96
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 17 Jul 2018 20:01:57 +0200
Revert "Make cursor follow text color"
This reverts commit b51bcd5553af3db394014efbd78acf7828fa48ff.
Diffstat:
M config.def.h | 2 ++
M x.c | 12 +++++-------
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/config.def.h b/config.def.h
t@@ -118,6 +118,8 @@ static const char *colorname[] = {
*/
unsigned int defaultfg = 7;
unsigned int defaultbg = 0;
+static unsigned int defaultcs = 256;
+static unsigned int defaultrcs = 257;
/*
* Default shape of cursor
diff --git a/x.c b/x.c
t@@ -1419,15 +1419,13 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, G…
g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE;
if (selected(cx, cy)) {
- drawcol = dc.col[g.bg];
+ g.bg = defaultrcs;
+ g.fg = defaultfg;
} else {
- g.mode |= ATTR_REVERSE;
-
- if (g.mode & ATTR_BOLD && BETWEEN(g.fg, 0, 7))
- drawcol = dc.col[g.fg + 8];
- else
- drawcol = dc.col[g.fg];
+ g.bg = defaultcs;
+ g.fg = defaultbg;
}
+ drawcol = dc.col[g.bg];
if (IS_SET(MODE_REVERSE)) {
drawcol.color.red = ~drawcol.color.red;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.