Introduction
Introduction Statistics Contact Development Disclaimer Help
tRevert "Simplify cursor color handling" - st - [fork] customized build of st, …
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 4f4bccd1627c845330235721f593d2e93418723d
parent 8ed7a4b3b755407a7724a586ef224051bc306f4f
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 17 Jul 2018 20:01:58 +0200
Revert "Simplify cursor color handling"
This reverts commit 1911c9274d9b03f3d7999c6ce26e2d5169642d26.
Diffstat:
M x.c | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/x.c b/x.c
t@@ -1418,19 +1418,25 @@ 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)) {
- g.bg = defaultrcs;
- g.fg = defaultfg;
- } else {
- g.bg = defaultcs;
- g.fg = defaultbg;
- }
- drawcol = dc.col[g.bg];
-
if (IS_SET(MODE_REVERSE)) {
- drawcol.color.red = ~drawcol.color.red;
- drawcol.color.green = ~drawcol.color.green;
- drawcol.color.blue = ~drawcol.color.blue;
+ g.mode |= ATTR_REVERSE;
+ g.bg = defaultfg;
+ if (selected(cx, cy)) {
+ drawcol = dc.col[defaultcs];
+ g.fg = defaultrcs;
+ } else {
+ drawcol = dc.col[defaultrcs];
+ g.fg = defaultcs;
+ }
+ } else {
+ if (selected(cx, cy)) {
+ g.fg = defaultfg;
+ g.bg = defaultrcs;
+ } else {
+ g.fg = defaultbg;
+ g.bg = defaultcs;
+ }
+ drawcol = dc.col[g.bg];
}
/* draw the new one */
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.