diff options
-rw-r--r-- | config.def.h | 2 | ||||
-rw-r--r-- | x.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/config.def.h b/config.def.h index 82b1b09..ca6b0db 100644 --- a/config.def.h +++ b/config.def.h | |||
@@ -118,8 +118,6 @@ static const char *colorname[] = { | |||
118 | */ | 118 | */ |
119 | unsigned int defaultfg = 7; | 119 | unsigned int defaultfg = 7; |
120 | unsigned int defaultbg = 0; | 120 | unsigned int defaultbg = 0; |
121 | static unsigned int defaultcs = 256; | ||
122 | static unsigned int defaultrcs = 257; | ||
123 | 121 | ||
124 | /* | 122 | /* |
125 | * Default shape of cursor | 123 | * Default shape of cursor |
@@ -1419,13 +1419,15 @@ 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 | g.bg = defaultrcs; | 1422 | drawcol = dc.col[g.bg]; |
1423 | g.fg = defaultfg; | ||
1424 | } else { | 1423 | } else { |
1425 | g.bg = defaultcs; | 1424 | g.mode |= ATTR_REVERSE; |
1426 | g.fg = defaultbg; | 1425 | |
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]; | ||
1427 | } | 1430 | } |
1428 | drawcol = dc.col[g.bg]; | ||
1429 | 1431 | ||
1430 | if (IS_SET(MODE_REVERSE)) { | 1432 | if (IS_SET(MODE_REVERSE)) { |
1431 | drawcol.color.red = ~drawcol.color.red; | 1433 | drawcol.color.red = ~drawcol.color.red; |