I have enabled CursorLine and CursorColumn highlights as follows:

(~/.vimrc):

[...]
        colorscheme almost-default
[...]
        if exists("+cursorcolumn")
                set cuc cul
        endif
[...]

(~/.vim/colors/almost-default.vim):

[...]
        if has("gui_running")
                hi clear CursorLine
                hi CursorLine guibg=#F4F4F4
                " leave it underlined (default) in cterm
        endif
        hi clear CursorColumn
        hi link CursorColumn CursorLine
[...]

However, I notice that their interaction with other highlights is not always the same, even though they are linked to each other: all the following is in the GUI:

- most syntax highlights change only the foreground, which is respected;
- a few, for instance helpNote (linked to Todo) and htmlError (linked to Error), change the background, which is changed to pale grey on both the cursor line and the cursor column; - neither the status line, the (text-style) tab line, nor text in another window than the current one, are affected.

I suppose the above can be regarded as normal. But:

- Search highlight sets the background to yellow; this is changed to pale grey on the cursor column but not on the cursor line; - SpecialKey sets the foreground to blue and NonText sets it to bold blue: these are changed to unbold and bold black (respectively) on the cursor line but not on the cursor column.

The fact that in these cases, highlights linked to each other do not behave identically, strikes me as weird. Bug or feature?


Best regards,
Tony.

Reply via email to