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

Failure to detect pasted content leads to wrongly continuing to suggest #583

Closed
PythonTryHard opened this issue Feb 4, 2021 · 2 comments

Comments

@PythonTryHard
Copy link

PythonTryHard commented Feb 4, 2021

Describe the bug

As an oh-my-zsh plugin, zsh-autosuggestions fails to detect if something has been pasted and will continue to suggest until such pasted content is modified (adding/removing a character)

To Reproduce (with Screenshots)

Note: All screenshots are obtained with the minimal .zshrc attached below.

  1. Write down any command that can lead to a suggestion.
    image
  2. Paste something in. The pasted content should be highlighted in white. Suggestion cannot be seen
    image
  3. Pressing should de-highlight the pasted content and reveal the suggestion still being there (when it supposedly shouldn't be)
    image
    Additionally, pressing or End should de-highlight and adding the suggestion to the end of the pasted content.
    image

Expected behavior

After pressing , there should be no suggestion, and pressing or End should not result in the suggestion getting added to the end.

Desktop

  • OS + distribution: KDE neon Testing Edition 5.21, and Ubuntu 20.10 (both are fully up-to-date as of writing this report)
  • Zsh version: 5.8
  • Plugin version: ae315ded4dba10685dbbafbfa2ff3c1aefeb490d

Additional context

Minimal .zshrc that can trigger this bug

Irreproducible locally with zsh -df followed by manual sourcing due to suggestion not appearing, however reproducible with the following minimal .zshrc

export ZSH="/home/f4ll3n53r4ph/.oh-my-zsh"
plugins=(zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh

Terminal tested against

On KDE neon:

  1. Konsole 20.12.2
  2. kitty 0.19.3 (freshly out of the box)

On Ubuntu 20.10:

  1. GNOME Terminal 3.38.0
@lihk11
Copy link

lihk11 commented Jun 19, 2021

have the same problem

@ericfreese
Copy link
Member

This appears to be a duplicate of #351

@PythonTryHard PythonTryHard closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants