zsh-vi-mode: Pasting in normal mode breaks
Not sure exactly when this started happening, but pasting breaks in subtle ways.

Here I’ve entered normal mode, and hit p. This pasted the contents of the buffer below my prompt. I cannot navigate to this content, and hitting dd to delete the line only deleted a single character at the end of that pasted contented.
If I type content in insert mode and then delete the line, my inserted content is deleted and the content that was pasted moves up into the correct position and is delete-able.
This is on the latest content but is reproduce-able a couple of commits back to feat: provide a mechanism to execute extra commands
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 28 (14 by maintainers)
Commits related to this issue
- fix(conf/zsh): try zsh-vi-mode again — committed to BerkeleyTrue/dotfiles by BerkeleyTrue 10 months ago
Hi @BerkeleyTrue
Thanks for your patient, and after some effort I have figured out some issues about visual line, such as
ddto delete one line orccto change one line and so on, the commit ( 0bcfe76 ) has fixed the issues mentioned, welcome to update it.Thanks and regards
also something maybe related: when I’m in normal mode, and I paste using ctrl+shift+v it filters all “g” characters from the string I pasted. And if it contained a double “gg” it would only leave one “g”
So when I paste “gregor” in normal mode, I get “reor”
I should add: happens in alacritty as well as in gnome-terminal
Hi @weisbrja, thanks for the suggestion, I will take a consideration for a better highlight background color by default in the future.
@jeffreytse I think that the red highlighting caused the confusion. In my opinion red is not really a good color, because we associate it with errors.
@jeffreytse Here are the plugins and config I use for zsh https://github.com/berkeleytrue/dotfiles/blob/master/.config/zsh/.zshrc And my theme https://github.com/berkeleytrue/dotfiles/blob/master/.config/zsh/ghanima.zsh-theme
Hi @BerkeleyTrue
Thanks for your actively reporting. And now I have confirm the bug about
ddto delete the line but only deleted a single character at the end of content. But the navigation issue has not appeared yet. I will focus to figure out the issues and thanks agian for your support.Thanks and regards