zsh-users / zsh-autosuggestions

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

The autocomplete misaligned when the width is limited #572

Closed trungdq88 closed 3 years ago

trungdq88 commented 3 years ago

Describe the bug

When the terminal width is less than the width of the auto-completed command, the cursor gets misaligned.

Reproduce

Sorry for the vague description, I tried to convey the idea the best I can but this one is very difficult to explain. Please take a look at this GIF: autocomplete-bug

If I disable the autocomplete plugin, the problem goes away. Can someone help, please? Thanks.

Desktop

trungdq88 commented 3 years ago

After reading this https://github.com/vercel/hyper/issues/283, I noticed my $PROMPT variable is invalid (missing some important format characters). I corrected it and the issue went away.