-
Notifications
You must be signed in to change notification settings - Fork 19
Handle only bg or fg set when resolving cursor hl #85
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
Conversation
@casr Could you test these changes when you get a chance? I think/hope they fix the issue. |
Thank you! I'll have a play. On first glance it seems more complex than I thought it would turn out but I might need to catch up to where your thinking is at! I'll try and set up some tests across term, cterm, gui and termguicolors with different combinations of fg/bg. Hopefully that'll be useful to test against. It might take me a couple of days to get to the time together though if you don't mind a short wait. |
The complexity seems to be unavoidable as fg/gb/foreground/background are not valid values for |
The simplest option here would be just to always use the fallback (term=reverse cterm=reverse) in non-gui vim, which doesn't seem at all that unreasonable, but is a change to the existing behaviour. |
4c904fa
to
d0c6385
Compare
btw, re fg/bg/foregound/background not being valid Having said that, this can be identified by checking for specific error numbers (see |
This works from my testing 🎉 I did notice one quirk - separate from this - where if you load a vim session without choosing any colorscheme you get an error when launching something like |
Thanks for testing, and noting that bug re devicon colors, I can reproduce locally using a minimal vimrc and |
The previous code to resolve the cursor highlight didn't allow for only the background or foreground to be set, i.e. only one of guifg & guibg. This was done intentionally to keep the code simple, on the assumption that only setting either background or foreground was so rare that it didn't warrant the additional complexity, but it seems that assumption was misguided, while it is unusual, it's not rare enough to ignore. See #84 for background Thanks @casr for reporting this and researching in some detail :-)
8c2af4c
to
2dc46a1
Compare
bug re devicon colors fixed, see e5ebb44 |
The previous code to resolve the cursor highlight didn't allow for only
the background or foreground to be set, i.e. only one of guifg & guibg.
This was done intentionally to keep the code simple, on the assumption
that only setting either background or foreground was so rare that it
didn't warrant the additional complexity, but it seems that assumption
was misguided, while it is unusual, it's not rare enough to ignore.
See #84 for background
Thanks @casr for reporting this and researching in some detail :-)