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

breaks paste in vte-based terminals #3645

Closed
mc-butler opened this issue May 15, 2016 · 5 comments
Closed

breaks paste in vte-based terminals #3645

mc-butler opened this issue May 15, 2016 · 5 comments
Labels
area: tty Interaction with the terminal, screen libraries prio: medium Has the potential to affect progress ver: 4.8.17 Reproducible in version 4.8.17

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3645
Reporter onlyjob (@onlyjob)
Mentions egmont (@egmontkob)

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".

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 16, 2016 at 19:43 UTC (comment 1)

See also #3207.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 16, 2016 at 19:47 UTC (comment 2)

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).

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 16, 2016 at 19:56 UTC (comment 3)

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?

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 16, 2016 at 20:10 UTC (comment 4)

  • Cc set to egmont

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on May 17, 2016 at 10:21 UTC (comment 5)

  • Milestone Future Releases deleted
  • Status changed from new to closed
  • Resolution set to duplicate

Closed as duplicate of #3207.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tty Interaction with the terminal, screen libraries prio: medium Has the potential to affect progress ver: 4.8.17 Reproducible in version 4.8.17
Development

No branches or pull requests

1 participant