zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

vi-forward-word results in duplicate completion

Open Spoons opened this issue 2 years ago • 2 comments

Thank you for this great project.

I'm finding that with zsh-autosuggestions and vi-mode, vi-forward-mode returns a duplicated completion. For example, completing ls .local/share/evolution:

start: ls .l # suggestion appears, trigger vi-forward-word ls .local/share/evolutionlocal/share/evolution

Occurs with zsh, zsh-autosuggestions, set -o vi, and no other configuration.

Spoons avatar Sep 14 '22 00:09 Spoons

same experience, but I found this may be caused by fast-syntax-highlight plugin. I got correct completion when disabled fast-syntax-highlighting

cloud-yu avatar Jan 06 '23 07:01 cloud-yu

Yeah I'm not able to reproduce this so simply. There must be something else going on.

❯ zsh -df
ericfreese% echo $ZSH_VERSION
5.9
ericfreese% grep '^# v' /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# v0.7.0
ericfreese% set -o vi
ericfreese% bindkey -M vicmd w
"w" vi-forward-word
ericfreese% source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
ericfreese% ls .local/share/
...
ericfreese% ls .l # then press esc and w
# It partially accepts the suggestion to `ls .local/` as I would expect

ericfreese avatar Feb 17 '23 22:02 ericfreese