diff options
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 30 |
1 files changed, 12 insertions, 18 deletions
@@ -1418,25 +1418,19 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) | |||
1418 | */ | 1418 | */ |
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 (IS_SET(MODE_REVERSE)) { | 1421 | if (selected(cx, cy)) { |
1422 | g.mode |= ATTR_REVERSE; | 1422 | g.bg = defaultrcs; |
1423 | g.bg = defaultfg; | 1423 | g.fg = defaultfg; |
1424 | if (selected(cx, cy)) { | ||
1425 | drawcol = dc.col[defaultcs]; | ||
1426 | g.fg = defaultrcs; | ||
1427 | } else { | ||
1428 | drawcol = dc.col[defaultrcs]; | ||
1429 | g.fg = defaultcs; | ||
1430 | } | ||
1431 | } else { | 1424 | } else { |
1432 | if (selected(cx, cy)) { | 1425 | g.bg = defaultcs; |
1433 | g.fg = defaultfg; | 1426 | g.fg = defaultbg; |
1434 | g.bg = defaultrcs; | 1427 | } |
1435 | } else { | 1428 | drawcol = dc.col[g.bg]; |
1436 | g.fg = defaultbg; | 1429 | |
1437 | g.bg = defaultcs; | 1430 | if (IS_SET(MODE_REVERSE)) { |
1438 | } | 1431 | drawcol.color.red = ~drawcol.color.red; |
1439 | drawcol = dc.col[g.bg]; | 1432 | drawcol.color.green = ~drawcol.color.green; |
1433 | drawcol.color.blue = ~drawcol.color.blue; | ||
1440 | } | 1434 | } |
1441 | 1435 | ||
1442 | /* draw the new one */ | 1436 | /* draw the new one */ |