zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
31.1k stars 1.86k forks source link

No color after accepting suggestion when using with marlonrichert / zsh-autocomplete #726

Open zhou13 opened 1 year ago

zhou13 commented 1 year ago

Describe the bug

To Reproduce

Steps to reproduce the behavior:

cd $(mktemp -d)
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git
git clone --depth 1 -- https://github.com/zsh-users/zsh-autosuggestions
> .zshrc <<EOF
PS1='%# ' PS2= RPS2='%^'; setopt transientrprompt interactivecomments
source ~/zsh-autocomplete/zsh-autocomplete.plugin.zsh
source ~/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
EOF
env -i HOME=$PWD PATH=$PATH TERM=$TERM ${TERMINFO:+TERMINFO=$TERMINFO} zsh -d

The bug only occurs when using with marlonrichert/zsh-autocomplete.

Expected behavior

Color are the same as if marlonrichert/zsh-autocomplete is not installed.

Desktop

zhou13 commented 1 year ago

Note that when https://github.com/zdharma/fast-syntax-highlighting is installed, the color will be updated correctly.

moorem6 commented 1 year ago

I don't have marlonrichert/zsh-autocomplete installed but I observe the same issue.

The plugins I have installed are:

romkatv/powerlevel10k
zsh-users/zsh-autosuggestions
robbyrussell/oh-my-zsh path:plugins/history

Removing P10k has no impact on the issue.

Adding fast-syntax-highlighting fixes the issue for me as well

Desktop

raxod502 commented 1 year ago

See also https://github.com/marlonrichert/zsh-autocomplete/issues/576 for a slightly different conflict between zsh-autocomplete and zsh-autosuggestions.