I've set the background color of the current line to light gray like this:
hi CursorLine cterm=NONE ctermbg=253
(Note that my color scheme is black-on-white.)
However, this way any background colors set by syntax highlighting is overridden by this, i.e. if a word on the current line is highlighted, say, white-on-red, I see the text as white-on-light gray. I only see that the line (or part of it) is supposed to be highlighted red if I move the cursor to another line.
What I'd like is that only the part of the current line for which no special background color is set is highlighted light-gray by cursorline, but that the cursorline highlighting is overridden by syntax highlighting.
Is this possible?
PS: The specific case where I've encountered this issue is the second line in a git commit tmp-file, where the text on the second line is white-on-red (for whatever reason).