Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost text appearing after pasting another text #766

Open
warcayac opened this issue Nov 2, 2023 · 5 comments
Open

Ghost text appearing after pasting another text #766

warcayac opened this issue Nov 2, 2023 · 5 comments
Labels

Comments

@warcayac
Copy link

warcayac commented Nov 2, 2023

Describe the bug

To Reproduce

Steps to reproduce the behavior:

When pasting any text after a command, a ghost text (last match) on right appears when pressing the left-arrow key, this ghost text stays there till I press any key like backspace key.

output-2023-11-02_11.44.21.mp4

Expected behavior

No ghost text displaying

Screenshots

Desktop

  • OS: EndeavourOS Linux x86_64
  • Kernel: 6.5.9-zen2-1-zen
  • Shell: zsh 5.9
  • DE: Plasma 5.27.9
  • WM: KWin
  • Terminal: HyperTerm
  • Terminal Font: JetBrainsMono Nerd Font
  • Plugin version: c3d4e57

Additional context

@warcayac warcayac added the bug label Nov 2, 2023
@TobiPeterG
Copy link

I have the same issue on openSUSE Tumbleweed with GNOME.
When inserting text and pressing the right arrow key when previously text was auto suggested, it gets inserted anyway

@xu-minghao317
Copy link

xu-minghao317 commented Dec 28, 2023

this is a known issue of ZSH, usually it can be fixed by setting the $LOCALE properly.

echo "export LANG=en_US.UTF-8" >> .zshenv
echo "export LC_ALL=en_US.UTF-8" >> .zshenv

@jathek
Copy link

jathek commented Feb 27, 2024

this is a known issue of ZSH, usually it can be fixed by setting the $LOCALE properly.

echo "export LANG=en_US.UTF-8" >> .zshenv
echo "export LC_ALL=en_US.UTF-8" >> .zshenv

This doesn't fix the issue for me with autosuggestions c3d4e57 and zsh 5.9 (x86_64-pc-msys) in Windows Terminal

ghost_text.mp4

EDIT: I was able to fix this bug by removing "completion" as an autosuggest strategy in my .zshrc

- ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion)
+ ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history)

@xu-minghao317
Copy link

Have you relaunch your terminal after this?

@jathek
Copy link

jathek commented Feb 28, 2024

Yes, I relaunched after removing "completion" and the ghost text is gone now. So it is something not working with the "completion" strategy, for me at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants