Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor-color same as background on error-highlight #252

Open
Maltimore opened this issue Apr 25, 2023 · 0 comments
Open

Cursor-color same as background on error-highlight #252

Maltimore opened this issue Apr 25, 2023 · 0 comments

Comments

@Maltimore
Copy link

Maltimore commented Apr 25, 2023

Describe the bug
The cursor-color is the same as the background on an error-character when using cursorline.

To Reproduce
Steps to reproduce the behavior:
set cursorline
Open a file with an error highlighted.
Move the cursor to an error-highlighted character.
The cursor won't be visible.

Expected behavior
Cursor can be distinguished.

Screenshots
When the cursor is not on the error text
image

Now the cursor is on the first character of the whitespace at the end of the line
image

Edit:
The way I highlight whitespace at the end of the line:

autocmd BufWinEnter <buffer> match Error /\s\+$/
autocmd InsertEnter <buffer> match Error /\s\+\%#\@<!$/
autocmd InsertLeave <buffer> match Error /\s\+$/
autocmd BufWinLeave <buffer> call clearmatches()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant