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

Inserting from history in Vim normal mode removes the last character

Open apotenza92 opened this issue 5 months ago • 5 comments

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.

apotenza92 avatar Jan 30 '24 23:01 apotenza92

I'm experiencing the same issue

pavelbrilliant avatar Feb 08 '24 03:02 pavelbrilliant

Any ideas with regards to this @marlonrichert ?

Thank you for this awesome project 🙏

StraightOuttaCrompton avatar Mar 11 '24 13:03 StraightOuttaCrompton

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

karamanliev avatar Apr 28 '24 23:04 karamanliev