TaDaa / vimade

An eye friendly plugin that fades your inactive buffers and preserves your syntax highlighting!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sign column with more than one sign is incorrectly dimmed

gzbd opened this issue · comments

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.

commented

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.

commented

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

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.

commented

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.