-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix! render highlights over rulers #3599
fix! render highlights over rulers #3599
Conversation
Was about to do the same. With this fix we loose the ability to set |
Spot on! |
I stumbled upon the same thing earlier and found the same flawed fix. One thing to note is that with the current code, themes which set the primary cursor color modifiers to »reversed« are not affected and don’t need the fix. But the majority of themes does. I wonder whether it’s even worth supporting a foreground color for rulers, as mentioned few themes use it and traditionally a colorcolumn/ruler is just that, a change in background color. Might be easier to just fix the few themes using it than to work around it. Another thing is that cursorline and cursorcolumn “disappear” behind the ruler, don’t know whether that’s on purpose and what was intended originally. |
My two cents, this PR might well fix more themes than it breaks. Currently the character under the curser disappears entirely, or becomes hard to read, under many themes (see for example gruvbox). This is because when just the ruler background is set, it can often match or be very close to the cursor foreground colour. |
@joshbainbridge This should just be merged. It’s been 7 months now and there is no reason this bug should endure. |
clsoing this PR as stale, the rendering code has been entirely replaced. The text rendingr has been split into base and overlay highlights. The rulers should be rendered after the base highlights but before the overlay highlights. Thank you for contributing! |
Bug pointed out here: #3587 (comment)
This fix is so easy I'm thinking I may have missed something?
EDIT: Ref ChrHorn below; themes that use
ui.ruler.fg
will not work anymore.