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

Highlights differ if window spans area with text #32

Open
gegoune opened this issue Jan 31, 2022 · 13 comments
Open

Highlights differ if window spans area with text #32

gegoune opened this issue Jan 31, 2022 · 13 comments
Labels
bug Something isn't working highlight Related to highlighting

Comments

@gegoune
Copy link

gegoune commented Jan 31, 2022

Hey, I was noticing that sometimes I get dimmed notifications and finally caught the scenario when dimming happens.

Highlights will be dimmed if fidget's window is drawn over area with no text; that is not the case if there is text on lines underneath fidget's window.

Please see this quick screencast illustrating above:

highs.mov

Please note that dimming goes away even if I change buffer while previously dimmed text still persist on the screen, but underlying lines are filed with text.

Desired highlights are the brighter ones:
title
task

Tried with:

require('fidget').setup {
  window = {
    winblend = 100,
  },
}

as well as window.winblend = 0 - outcome is the same in both cases.

@gegoune gegoune changed the title Highlights differ if window spans are with text Highlights differ if window spans area with text Jan 31, 2022
@j-hui j-hui added bug Something isn't working highlight Related to highlighting labels Feb 1, 2022
@xulongwu4
Copy link

I noticed that this doesn't happen when winblend is zero

@gegoune
Copy link
Author

gegoune commented Feb 14, 2022

Can confirm. As you can see in my original report I mistakenly set window.winblend instead of window.blend which I believe was in readme/docs at the time.

@j-hui
Copy link
Owner

j-hui commented Feb 14, 2022

Yeah there was previously a typo in the docs, which has since been fixed.

Sorry I haven't had time to look into this yet, but ideally this shouldn't happen even with window.blend set to 100.

@lalitmee
Copy link

lalitmee commented Mar 5, 2022

@j-hui, I am not sure if this is a related issue, but I am also facing something like this.

fidget

I have tried setting the highlights but that is only setting the highlight for the foreground, not the background.

@lalitmee
Copy link

lalitmee commented Mar 7, 2022

In my config, I had Normal highlight guibg set to NONE.

Removed that and fixed.

@j-hui
Copy link
Owner

j-hui commented Nov 10, 2023

Seems to be fixable with some amount of config wrangling.

@j-hui j-hui closed this as completed Nov 10, 2023
@gegoune
Copy link
Author

gegoune commented Nov 22, 2023

Would you mind explaining what you have in mind? I am still seeing that issue with latest changes (great work btw! Thanks a bunch!)

@j-hui
Copy link
Owner

j-hui commented Nov 22, 2023

@gegoune Sure, what config and theme are you using at the moment?

@gegoune
Copy link
Author

gegoune commented Nov 23, 2023

All defaults from fight.nvim, just calling setup(), colorscheme is zenbones.

@j-hui
Copy link
Owner

j-hui commented Nov 24, 2023

Ugh ok I had really not closely read the steps to reproduce from the original post, this is clearly still an issue.

@j-hui j-hui reopened this Nov 24, 2023
@rtgiskard
Copy link

rtgiskard commented Dec 29, 2023

Ugh ok I had really not closely read the steps to reproduce from the original post, this is clearly still an issue.

I have just find the similar issue related to winblend:
winblend issue

The C source file end at line 37, the right bottom notifications are fidget progress messages from <C-f> format operation.
The color of popup progress message greatly inflected by the background context with winblend=100.

To reproduce, you may use this config, and edit some file like lua, then just press <C-f> repeated so that you get repeat progress message for the format operation.

@j-hui
Copy link
Owner

j-hui commented Dec 29, 2023

Yeah so this is something to do with the semantics of winblend. I looked into it at one point since re-opening this issue, but didn’t really conclude anything useful, though I suspect a fix will either have to come from (1) Neovim itself, or (2) switching to extmark-based rendering (which gives me more fine-grained control over which parts of the buffer are populated).

I wanted to wait until I’d experimented with (2) first before filing an issue upstream/haven’t had bandwidth to get around to it (I’m working on deduplication rn)

@baggiponte
Copy link

I had the same problem as @lalitmee. I am using gruvbox material with transparent background and I solved it by setting winblend to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working highlight Related to highlighting
Projects
None yet
Development

No branches or pull requests

6 participants