Xinqi Bao's Git
projects
/
st.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
732be22
)
Revert "Make cursor follow text color"
author
Hiltjo Posthuma <
[email protected]
>
Tue, 17 Jul 2018 18:01:57 +0000
(20:01 +0200)
committer
Hiltjo Posthuma <
[email protected]
>
Tue, 17 Jul 2018 18:01:57 +0000
(20:01 +0200)
This reverts commit
b51bcd5553af3db394014efbd78acf7828fa48ff
.
config.def.h
diff
|
blob
|
history
x.c
diff
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
ca6b0db
..
82b1b09
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-118,6
+118,8
@@
static const char *colorname[] = {
*/
unsigned int defaultfg = 7;
unsigned int defaultbg = 0;
*/
unsigned int defaultfg = 7;
unsigned int defaultbg = 0;
+static unsigned int defaultcs = 256;
+static unsigned int defaultrcs = 257;
/*
* Default shape of cursor
/*
* Default shape of cursor
diff --git
a/x.c
b/x.c
index
b51821d
..
ffd005f
100644
(file)
--- a/
x.c
+++ b/
x.c
@@
-1419,15
+1419,13
@@
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)) {
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 {
} 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;
if (IS_SET(MODE_REVERSE)) {
drawcol.color.red = ~drawcol.color.red;