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

Make character under cursor visible #9

Merged

Conversation

rlue
Copy link
Contributor

@rlue rlue commented Oct 21, 2020

Prior to this commit, it was possible (in some cases)
for the bg and fg colors at the cursor to be the same,
resulting in the cursor hiding the character underneath it.

(I personally only noticed this in gvim,
but thought it would be safer to explicitly set the color
in the terminal, as well.)

This commit fixes this issue by setting the fg/bg of the cursor
to the inverse of the fg/bg colors in normal mode (hi Normal).

Prior to this commit, it was possible (in some cases)
for the bg and fg colors at the cursor to be the same,
resulting in the cursor hiding the character underneath it.

(I personally only noticed this in gvim,
but thought it would be safer to explicitly set the color
in the terminal, as well.)

This commit fixes this issue by setting the fg/bg of the cursor
to the inverse of the fg/bg colors in normal mode (`hi Normal`).
@karoliskoncevicius
Copy link
Owner

Thanks a lot, merged.

Makes sense that this will only affect gvim: https://vi.stackexchange.com/questions/7176/why-is-highlight-cursor-ignored

@karoliskoncevicius karoliskoncevicius merged commit f219537 into karoliskoncevicius:master Oct 22, 2020
@rlue
Copy link
Contributor Author

rlue commented Oct 23, 2020

TIL!

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

Successfully merging this pull request may close these issues.

None yet

2 participants