zsh-users / zsh-autosuggestions

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

ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS not working for `forward-char` #537

Closed marlonrichert closed 3 years ago

marlonrichert commented 4 years ago

Describe the bug

I added forward-char to ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS, but when I press right arrow, it accepts the whole line, instead of just one character.

To Reproduce

Given:

When

  1. I input the following in the shell:
    $ zsh -df
    % typeset -ga ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS
    % ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS=(
    forward-char
    vi-forward-char
    forward-word
    emacs-forward-word
    vi-forward-word
    vi-forward-word-end
    vi-forward-blank-word
    vi-forward-blank-word-end
    vi-find-next-char
    vi-find-next-char-skip
    )
    % source path/to/zsh-autosuggestions.zsh
  2. I type s.
    • I get ource path/to/zsh-autosuggestions.zsh as a suggestion.
  3. I press right arrow to accept the first character of the suggestion.

Then

Expected behavior

Only the first character of the suggestion (o) should get accepted.

Desktop

Additional context

This used to work just fine.

bayesrule commented 4 years ago

Same issue, win10+wsl2+zsh

p0da commented 4 years ago

Also having the same problem on Arch/zsh 5.8

marlonrichert commented 3 years ago

Appears to be working correctly now.