Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZVM conflicts with bracketed paste #238

Open
2 of 3 tasks
ipkiss42 opened this issue Aug 6, 2023 · 0 comments
Open
2 of 3 tasks

ZVM conflicts with bracketed paste #238

ipkiss42 opened this issue Aug 6, 2023 · 0 comments

Comments

@ipkiss42
Copy link

ipkiss42 commented Aug 6, 2023

General information

  • Terminal program: WezTerm v20230408.112425 (xterm-256color)
  • Operating system: Amazon Linux 2 (5.10.184-153.749.amzn2int.x86_64)
  • ZSH framework: antidote (but I had the same issue with a manual installation of ZVM)
  • ZSH version: zsh 5.8.1 (x86_64-koji-linux-gnu)
  • ZVM version: zsh-vi-mode 0.10.0

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program

Problem description

When bracketed paste is enabled in both zsh (this is the default behavior) and the terminal, pasting a oneliner in insert mode prints the clipboard text (as expected), but also switches to normal mode and flips the case of the character before the cursor (and all the ones after it, if the cursor was not at the end of the line).

This does not happen without bracketed paste. This also doesn't happen without ZVM.

It looks like the \e[201~ sequence at the end of the bracketed paste is intercepted by ZVM, which interprets it as user input. Indeed, after one undo the original text is restored. But of course it is annoying to undo and go back to insert mode every time I paste something...

Reproduction steps

  1. Use a terminal supporting bracketed paste, such as WezTerm
  2. Enable bracketed paste in the shell, if not already on
  3. Place some simple one-liner text in your clipboard, e.g. Hello World
  4. Paste the text in zsh, in insert mode
  5. Observe that the text has become Hello WorlD and that you are in normal mode
  6. Disable bracketed paste, e.g. with unset zle_bracketed_paste. Or disable ZVM instead
  7. Paste the text again
  8. Observe that the text is pasted correctly

Expected behavior

ZVM is "bracketed paste aware" and handles the special sequences gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant