Setting the cursor color causes the character under the cursor to be drawn with the normal foreground color. When the cursor color is the same as the foreground color, you end up unable to see the character under the cursor. VTE has a special case that draws the character under the cursor with the background color when the cursor color is set to NULL.
Here's a patch which makes roxterm set the cursor color to NULL when it matches the foreground text color:
From 9a9d9bf2a9bf64767dc7d542a580b6ac190a7469 Mon Sep 17 00:00:00 2001
From: Keith Packard keithp@keithp.com
Date: Sat, 10 Aug 2013 21:31:00 +0200
Subject: [PATCH] When cursor colour matches fg colour, set cursor to NULL
VTE has magic semantics for a NULL cursor colour, causing it to flip
the text colour for characters under the cursor so you can read them
that way.
Signed-off-by: Keith Packard keithp@keithp.com
src/roxterm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/roxterm.c b/src/roxterm.c
index 29eee80..60481d7 100644
--- a/src/roxterm.c
+++ b/src/roxterm.c
@@ -1245,8 +1245,12 @@ static void roxterm_update_background(ROXTermData * roxterm, VteTerminal * vte)
static void
roxterm_update_cursor_colour(ROXTermData * roxterm, VteTerminal * vte)
{
- COLOUR_SET_VTE(_cursor)(vte,
- colour_scheme_get_cursor_colour(roxterm->colour_scheme, TRUE));
+ COLOUR_T cursor_colour = colour_scheme_get_cursor_colour(roxterm->colour_scheme, TRUE);
+ COLOUR_T
fg_colour = colour_scheme_get_foreground_colour(roxterm->colour_scheme, TRUE);
+
+ if (cursor_colour && fg_colour && COLOUR_EQUAL(cursor_colour, fg_colour))
+ cursor_colour = NULL;
+ COLOUR_SET_VTE(_cursor)(vte, cursor_colour);
}
static void
1.8.3.2