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

Sign column with more than one sign is incorrectly dimmed #54

Open
gzbd opened this issue Jan 10, 2021 · 4 comments
Open

Sign column with more than one sign is incorrectly dimmed #54

gzbd opened this issue Jan 10, 2021 · 4 comments

Comments

@gzbd
Copy link

gzbd commented Jan 10, 2021

Hi,

First, I would thank you for this great plugin. I'm using it every day and it rocks. I've found one problem with neovim settings.

Neovim has a feature to set more than one sign in sign columns (auto:[1-9]). If I set the signcolumn setting to auto:2 it works fine when two signs are displayed, but when only one sign is shown it gets doubled in a dimmed inactive window. Check the screenshot below

2021-01-10_12-52

In line 189 the '+' sign was added from gitgutter plugin. When I switch focus to another window it gets displayed twice and one sign is highlighted.

@TaDaa
Copy link
Owner

TaDaa commented Jan 11, 2021

Hi @gzbd, thanks for opening this issue -- I should be able to take a look at this / resolve when I have some free time in a day or two -- the fader sign logic will have to change a bit to support, but should be doable.

TaDaa added a commit that referenced this issue Mar 13, 2021
…ement ids to fix multiple signs -- should work for majority of plugins
@TaDaa
Copy link
Owner

TaDaa commented Mar 14, 2021

Thanks for the PR and sorry for the delay -- let me know if the latest works out -- did some reworking to get signs replaced using id vs the current place on top system -- think it should work out better on neovim

@gzbd
Copy link
Author

gzbd commented Mar 14, 2021

Your solution works for me. However, the vim doc states that

If multiple placed signs use the same identifier, then jumping to or removing a
sign becomes unpredictable.

I think it is a problem for an inactive buffer in which content will update - for example when the user restarts coc, all the diagnostic signs are replaced. I guess there is no easy, complete solution to fade the signs.

@TaDaa
Copy link
Owner

TaDaa commented Mar 15, 2021

great find! did not see that.

It seems the current the behavior is doing this:

If there is a sign on the same line with the same id and group, then the previous sign gets removed.
If the the sign is on a different line with the same id and group, both signs exist at the same time.

For now this should work (and hopefully the behavior doesn't change), but we could stick an unplace before setting the same sign id as well.

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

2 participants