On 09-Sep-07 18:27, Nico Weber wrote:
> Hi,
> 
> `set cursorline` seems to override the background colors even for characters
> that are in group Error. With the default color scheme, this makes Errors
> unreadable: They are displayed with red background and white text, and the
> default cursorline color is a light grey. If the cursor is in the same line
> as the error, Errors are displayed with a light grey background and white
> text -- barely readable (tested on gvim/ubuntu and carbon vim/osx).
> 
> Any ideas what could be done about this?
> 
> Thanks, Nico

I'm a big fan of 'set cursorline', but I have always wondered why it takes
precedence over any background colors set by syntax highlighting. Any
highlighting that uses a marker-like coloring with inverted text and background
colors suffers from very low contrast when the cursor is on that line. The
'Error' group is the best example, but many plugins (e.g. MultipleSearch.vim)
use similar highlighting, and suffer as well.

How about changing the precedence, so that 'cursorline' is only applied when
there's no background color set by a highlight group? The only problem I can
think of is that when every character in a line has a custom background color,
the cursorline would be invisible, but that's a rather pathological case, isn't 
it?

-- regards, ingo

PS: The best visual results would be achieved by adding / subtracting the
'cursorline' RGB values from the normal background colors, resulting in an
overall shading of the current line, with any custom highlighting "shining
through". But that algorithm would only work well for non-paletted, 24-bit RGB,
i.e. GVIM, and is thus arguably too specific to implement.

/^-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui