GNOME Bugzilla – Bug 695011
Set contrasting cursor foreground colour
Last modified: 2016-02-11 16:12:29 UTC
Any character underneath the cursor should be drawn in a foreground colour that contrasts with the cursor background. With the default colours of black for both you can't see the character under the cursor at all when it isn't blinking.
I didn't describe that very well. If the cursor colour isn't explicitly set, or is NULL, it's OK: characters under the cursor are drawn in "inverse video". But if you set an actual colour with vte_terminal_set_color_cursor (or the _rgba version) text under the cursor is drawn in its original colour. In most colour schemes there is very little contrast between the default text colour and the cursor.
Created attachment 280892 [details] [review] vte 0.36.3 patch that adds cursor foreground color setting The attached patch against vte 0.36.3 adds vte_terminal_set_color_cursor_foreground{,_rgba} functions.
Comment on attachment 280892 [details] [review] vte 0.36.3 patch that adds cursor foreground color setting Doesn't apply to master.
Created attachment 285589 [details] [review] cursor foreground patch against master
The '0.36.3' patch doesn't in fact apply to the 0.36.3 git tag, and the 'master' patch doesn't apply to *any* git commit that I could find... Can you please attach a "git format-patch" formatted patch ?
I committed an variant of this patch. I didn't add the escape sequences to change the cursor foreground colour, since we should NOT just add new escape sequences (here OSC 20) without consulting with xterm upstream to reserve it. Also leaving open in order to add the corresponding UI to gnome-terminal.
I think it would also be a good idea to rename vte_terminal_set_color_cursor to "vte_terminal_set_color_cursor_background" and make the former a deprecated alias.
IMHO that's needless API churn, but we can definitely dot his the next time we break API.
Now that this is dealt with in vte and we're just waiting for gnome-terminal to implement it I think it's appropriate to mark this as a duplicate. *** This bug has been marked as a duplicate of bug 85821 ***