intermittenly pasting text includes extraneous escape sequences before and after the text
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: Build 3.3.9
- OS version: macOS Mojave Version 10.14.6
- Attach com.googlecode.iterm2.plist here (drag-drop from finder into this window)
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Attach a screen capture video if it would make the reproduction steps clearer.
- Are you reporting a performance issue, excessive CPU usage, or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
- Are you reporting excessive memory usage? Please attach a heap analysis: https://gitlab.com/gnachman/iterm2/wikis/heapshot
PLEASE ATTACH YOUR PLIST FILE FOR BUG REPORTS! Seriously! I'll probably ask you for it if you don’t.
Detailed steps to reproduce the problem:
- sweep out text on the window
- paste it
- it's intermittent
Periodically when I copy and paste something within iTerm, I get some “extra” escape sequences at the beginning and end of the pasted text. Since I use emacs mode within bash, these inevitably cause my terminal to beep and then extra characters show up before and after the text. I finally was able to capture what those escape sequences are. Here is an example of what was pasted (^[ is of course an escape character):
^[[200~/sbin/ifconfig -a ^[[201~
This is what it looks like after emacs mode beeps at me when it doesn’t recognize the “ESC-[-2” sequence:
00~/sbin/ifconfig -a 01~
I then need to go to the beginning and end of the lines and remove those three extra characters.
WHY ARE THESE ESCAPE SEQUENCES BEING SENT?
I’ve been through and through the options. Nothing that looked vaguely like it would be related seems to have done anything.
What should have happened:
The text that I copied should have been sent and nothing more: