zsh-users / zsh-autosuggestions

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

git highlighting weird with `zsh-autosuggestions` and `xterm-256color` #536

Open zhanglintc opened 4 years ago

zhanglintc commented 4 years ago

Describe the bug

After I installed zsh-autosuggestions and do export TERM=xterm-256color, git highlighting become weired, the color of first line is different from the others:

git-st

git-lg

When in git lg, if I scroll up and down, the red of first line could become normal. If I do git status one more time, the color could become normal, too.

If I disable any one of zsh-autosuggestions and export TERM=xterm-256color, the git highlighting become normal. So I think zsh-autosuggestions is the problem. Does anybody know why?

To Reproduce

Steps to reproduce the behavior:

% zsh -df
% source path/to/zsh-autosuggestions.zsh
% export TERM=xterm-256color
%
% git status
% git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'

Expected behavior

Color of all lines are the same.

Screenshots

Desktop

Additional context