Xinqi Bao's Git
projects
/
st.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5535c1f
)
Revert "Fix crash when cursor color is truecolor"
author
Hiltjo Posthuma <
[email protected]
>
Tue, 17 Jul 2018 18:01:54 +0000
(20:01 +0200)
committer
Hiltjo Posthuma <
[email protected]
>
Tue, 17 Jul 2018 18:01:54 +0000
(20:01 +0200)
This reverts commit
5535c1f04c665c05faff2a65d5558246b7748d49
.
x.c
patch
|
blob
|
history
diff --git
a/x.c
b/x.c
index
4155a70
..
b51821d
100644
(file)
--- a/
x.c
+++ b/
x.c
@@
-1404,7
+1404,6
@@
void
xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
{
Color drawcol;
xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
{
Color drawcol;
- uint32_t cc;
/* remove the old cursor */
if (selected(ox, oy))
/* remove the old cursor */
if (selected(ox, oy))
@@
-1420,22
+1419,14
@@
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)) {
-
cc = g.bg
;
+
drawcol = dc.col[g.bg]
;
} else {
g.mode |= ATTR_REVERSE;
} else {
g.mode |= ATTR_REVERSE;
+
if (g.mode & ATTR_BOLD && BETWEEN(g.fg, 0, 7))
if (g.mode & ATTR_BOLD && BETWEEN(g.fg, 0, 7))
-
cc = g.fg + 8
;
+
drawcol = dc.col[g.fg + 8]
;
else
else
- cc = g.fg;
- }
-
- if (IS_TRUECOL(cc)) {
- drawcol.color.alpha = 0xffff;
- drawcol.color.red = TRUERED(cc);
- drawcol.color.green = TRUEGREEN(cc);
- drawcol.color.blue = TRUEBLUE(cc);
- } else {
- drawcol = dc.col[cc];
+ drawcol = dc.col[g.fg];
}
if (IS_SET(MODE_REVERSE)) {
}
if (IS_SET(MODE_REVERSE)) {