marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.02k stars 144 forks source link

Inserting from history in Vim normal mode removes the last character #683

Open apotenza92 opened 5 months ago

apotenza92 commented 5 months ago

Environment

% typeset -p1 VENDOR OSTYPE ZSH_PATCHLEVEL _autocomplete__funcfiletrace
typeset VENDOR=apple
typeset OSTYPE=darwin23.0
typeset ZSH_PATCHLEVEL=zsh-5.9-0-g73d3173
typeset -a _autocomplete__funcfiletrace=(
  /opt/homebrew/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh:4
  /Users/user/.config/zsh/.zshrc:2
  zsh:0
)
% git -C ~autocomplete log --oneline -n1
cfac516ee (HEAD -> stable, tag: 4.2.6) Merge pull request #16538 from dduugg/TopLevelMethodDefinition

macOS Sonoma 14.3 iTerm

Steps to reproduce

Using Vim mode via bindkey -v in zsh.

In normal mode press 'k' to go 'up' into history.

Screenshot 2024-01-31 at 10 34 34 am

; is automatically added to end of line. Press enter to insert item from history. Goes back to normal mode, ; is highlighted but the last character of the command (l in this case) is bolded and is not actually inserted:

Screenshot 2024-01-31 at 10 35 06 am

If I press enter again immediately after this the l is not inserted in the command:

Screenshot 2024-01-31 at 10 36 28 am

Expectation

The ; at the end of line should not interfere with the other text inserted from history.

pavelbrilliant commented 5 months ago

I'm experiencing the same issue

StraightOuttaCrompton commented 3 months ago

Any ideas with regards to this @marlonrichert ?

Thank you for this awesome project 🙏

karamanliev commented 2 months ago

I am experiencing this same problem. My zsh config is pretty simple with only zsh-completions, zsh-autosuggestion and fast-syntax-highlighting along with zsh-autocomplete. I don't use oh my zsh. OS is Linux, terminal is WezTerm.

Thanks for the plugin, I am still going to use it and switching back to emacs mode, because it's that good, but this issue makes it literally unusable in vi-mode.

vi-problem-cut.webm

k14lb3 commented 1 month ago

Same issue.

matthewtapps commented 4 weeks ago

Also having this issue and was going a bit nuts trying to figure out which plugin was conflicting, glad it's not just me.

egemenkopuz commented 3 days ago

Same issue.