zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
31.57k stars 1.88k forks source link

Suggestions are not being cleared after not accepting #746

Closed Allaman closed 6 months ago

Allaman commented 1 year ago

Describe the bug

The auto-suggested text is not distinguishable if not being accepted. For instance, in the following screenshot, I entered cd temp<CR> and afterward cd<CR>. Before hitting CR in the last command, I could see "temp" in a dark gray color. As I didn't accept the suggestion, my expectation would be that the suggestion stays displayed in the same dark gray color on my terminal, which I am quite sure was the case some time ago.

image

Unfortunately, I had a hard time creating a reproducible minimal demo. What I recognized is, that the behavior is correct when I remove either of these lines from my config:

I am also aware of this issue and that issue. I played around with different style configurations and installed zsh 5.9 as well. No success.

The issue also occurs on kitty and alacritty and on my NixOS box. This drives me nuts, and I have a very hard time to tackle this down.

Any help or hint is much appreciated!

For reference – my config:

Desktop

jonaustin commented 1 month ago

@Allaman also having this issue; were you able to fix without completely removing fast-syntax-highlighting?

(also, strangely, with pretty much the exact same zsh config/plugins, it works fine on my Arch Linux box (zsh 5.9), but broke recently on mac (broken on mac with both zsh 5.8 and 5.9)

Allaman commented 1 month ago

@jonaustin to be honest, I don't know my solution anymore. I see in my config that I use fast-syntax-highlighting and no issues. But I am also in the middle of some refactoring, so my repo is not up to date