Ticket #3645 (closed defect: duplicate)
breaks paste in vte-based terminals
Reported by: | onlyjob | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mc-tty | Version: | 4.8.17 |
Keywords: | Cc: | egmont | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
As reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824359
mc-4.8.17 fails to clean up the terminal
settings when exiting. If the selection is "foo", what's getting pasted is:
00~foo01~
The actual bytes are:
00000000 1b 5b 32 30 30 7e 66 6f 6f 1b 5b 32 30 31 7e 0a |.[200~foo.[201~.|
There's no regression in xterm or rxvt, there is in xfce4-terminal and
lxterminal (and presumably anything else vte based).
Reinstalling mc=3:4.8.15-2 (testing) makes paste work again.
This is so called "bracketed paste mode", set by "\e[?2004h" which new mc
enables at start. To clear it, please emit "\e[?2004l".
Change History
comment:2 Changed 9 years ago by egmont
I _can_ reproduce the regression from 4.8.15 to 4.8.17 in terminal emulators based on the Gtk2-based ancient unmaintained and quite buggy VTE 0.28 (e.g. xfce4-terminal, lxterminal, mate-terminal, terminator).
I cannot, however, see any regression in terminal emulators based on the recent, Gtk3-based VTE widget (e.g. gnome-terminal, roxterm, terminix, terminator's gtk3 branch, tilda, sakura).
comment:3 Changed 9 years ago by egmont
As per #3207 comment 16 (and around) I think it's not mc's job to work around this bug in vte2. It's unfortunate that some refactoring made the bug more prominent, but it's not by any means mc's fault, and the conclusion in #3207 was that it's not feasible for mc to implement a workaround.
The real solution would be to port every vte-based terminal emulator to vte3, and purge those from all the Linux the distributions that cannot be ported.
vte2 (gtk2-based vte to be more precise; tarballs up to 0.28) has been unmaintained for 5 years now and contains plenty of waaaaaaay more serious problems than this one.
vte3 (that is, gtk3-based vte; tarballs since 0.30) was first released 4.5 years ago. Any project that was unable to catch up with this change for such a long time deserves to be dropped from distributions.
Or, if someone wishes to stick to a terminal emulator that's 5 years old, they should also be happy with an approximately 5 year old mc, isn't it fair enough?
See also #3207.