mate-desktop / mate-terminal

The MATE Terminal Emulator
http://www.mate-desktop.org
GNU General Public License v3.0
135 stars 73 forks source link

Select all only selects the viewable text before scrolling #372

Open LiamDawe opened 3 years ago

LiamDawe commented 3 years ago

Expected behaviour

Select all should actually select ALL text, not just what's on the screen before the cut-off.

Actual behaviour

It only selects what's currently seen.

Steps to reproduce the behaviour

Have something really long in terminal and then try to select all, see what happens?

MATE general version

1.24.1-1

Package version

1.24.1-1

Linux Distribution

EndeavorOS (Arch), latest updates

Link to bugreport of your Distribution (requirement)

I don't know if it's a distribution issue or intentional, won't make one until people working on the actual app say what is intentional otherwise it's a waste of everyone's time.

What I would like to do is find out why this happens. So we can find the root cause together. Let me know what tests I can run.

lukefromdc commented 3 years ago

I have NOT had this problem in mate-terminal from git master, now or when master was on 1.24. Wonder what is different?

flexiondotorg commented 3 years ago

Just tested this on Ubuntu MATE 20.04.1 using mate-terminal 1.24.1 and can not reproduce the issue.

rbuj commented 3 years ago

culprit https://gitlab.gnome.org/GNOME/vte/-/commit/caf8a6a7a17a3f70fa5fc611c71ffb27a5cfee75

JoakimCh commented 3 years ago

@rbuj What could/will be done about it?

I also have this issue after updating my Debian Bullseye install. Mate Terminal here is also version 1.24.1-1 and MATE 1.24.1.

Very annoying since I often have to copy all the output and store it for later.

rbuj commented 3 years ago

@rbuj What could/will be done about it?

You can file a bug report at https://gitlab.gnome.org/GNOME/vte/-/issues

N0rbert commented 3 years ago

Ubuntu MATE 21.04 is affected, see https://pad.lv/1922276 . I'm shocked. I copy output from terminal very often. Could someone please report this to VTE bugzilla to revert the above-mentioned commit?

lukefromdc commented 3 years ago

I just CONFIRMED rolling back libvte to Debian's libvte-2.91-0_0.62.1-1_amd64.deb fixes this and restores the ability to cut and paste text that has been scrolled past

N0rbert commented 3 years ago

Reverting VTE on Ubuntu 21.04 to version 0.62.0-1ubuntu1 from Ubuntu 20.10 helps.

N0rbert commented 2 years ago

Ubuntu MATE 21.10 impish will be affected by this bug if no additional measures will be taken. Please do something :cry:

lukefromdc commented 2 years ago

I suspect this is another VTE issue. I have kept an older version of VTE on my system since the version of it that broke scrolling support entirely.Are you able to scroll back at all? If so VTE has been partially but not entirely fixed.

Both mate-terminal and gnome-terminal (from which mate-terminal was forked) are basically wrappers around VTE, which is not our package.

On 9/26/2021 at 7:17 AM, "N0rbert" @.***> wrote:

Ubuntu MATE 21.10 impish will be affected by this bug if no additional measures will be taken. Please do something :cry:

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/mate- terminal/issues/372#issuecomment-927287369

JoakimCh commented 2 years ago

I suspect this is another VTE issue. I have kept an older version of VTE on my system since the version of it that broke scrolling support entirely.Are you able to scroll back at all? If so VTE has been partially but not entirely fixed. Both mate-terminal and gnome-terminal (from which mate-terminal was forked) are basically wrappers around VTE, which is not our package.

Yeah, someone already linked to the commit which destroyed it:

Including the scrollback in select-all makes it too easy to select so much data that putting it on the clipboard either hangs the process for a long time or causes a crash: https://gitlab.gnome.org/GNOME/vte/-/commit/caf8a6a7a17a3f70fa5fc611c71ffb27a5cfee75

I don't know why anyone would accept such a stupid solution requiring another fix, yes he put "FIXME!" in a comment...

allanlaal commented 2 years ago

main issue for tracking: https://gitlab.gnome.org/GNOME/vte/-/issues/2504

N0rbert commented 2 years ago

We should do something with these smart evil geniuses from GNOME. This bug should not appear in Ubuntu MATE 22.04 LTS.

N0rbert commented 2 years ago

Ubuntu MATE 22.04 LTS final release is still affected.

WellRestedSloth commented 2 years ago

Yes Ubuntu Mate 22.04 LTS is affected as of latest on May 17, 2022.

It's silly how this regression got in there in the first place. A workaround can be to redirect the output to a file: (example):

make &> buildlog.txt

Or another workaround: Scroll to top of terminal. Highlight some letters with your mouse. Scroll to bottom. Hold down shift and click bottom of text in terminal. All should be highlited now. Now you can right-click and choose Copy. (or CTRL+SHIFT+C)

This regression is bad as it breaks our automated scripts to grab data off the terminal. Now have a couple of devs looking for alternatives (terminals or re-writing the scripts to get the data). Ugh...

[Edit:] It looks like this regression is a "fix" for some out-of-memory crash when copying too much data to the clipboard. So instead of doing a proper fix, they just disable (cripple) the feature. My workaround mentioned above STILL manages to copy tons of data onto the clipboard probably causing the same out-of-memory crash. So why not also remove manually highlighting all of the text in the terminal, and also remove the unlimited scroll buffer?? This is so wrong on so many levels.

N0rbert commented 2 years ago

Better temporary fix for Ubuntu MATE 22.04 LTS is reverting VTE to previous non-buggy version:

To fix the 1922276 bug one can use 20.04 LTS's VTE library from my PPA as follows:

sudo add-apt-repository ppa:nrbrtx/vte
sudo apt-get update
sudo apt-get dist-upgrade

(The method shown above was originally posted at https://ubuntu-mate.community/t/howto-fixing-some-ubuntu-mate-22-04-lts-issues/25345 ) .

WellRestedSloth commented 2 years ago

Hi N0rbert, Thank you! Your VTE PPA is working great. Ah... I was unaware of the forum. I'm a software dev myself so naturally I head to the source code. Thanks for the link! You would think terminal emulation is a mature technology that only needs the odd security update, but I guess not.

N0rbert commented 1 year ago

Both Debian 11 and 12 are still affected by this bug. Reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033495 .