GNOME Bugzilla – Bug 765276
Fails to copy first line of multi-line selection, in single click selection mode
Last modified: 2016-05-09 16:05:35 UTC
Hi, In the single click selection mode, the first line of a multi-line selection is replaced with a blank line when pasted. This is a regression from previous versions where the copied text would match the visible selection. One workaround is to begin or end the selection by precisely hovering the pointer over the leftmost column on the first line of the selection. Another workaround is to use the triple click selection mode. I've reproduced this with a fresh install of Debian testing ("stretch") with the GNOME desktop environment task enabled. The following package versions have the buggy behavior: - gnome-terminal 3.20.0-1 - vte2.91 0.44.0-1 The following package versions have the expected behavior: - gnome-terminal 3.18.3-1 - vte2.91 0.42.5-1 I built vte from git and found that tag 0.43.0 has the expected behavior while tag 0.44.0 has the buggy behavior. Bisecting between 0.43.0 and 0.44.0 found the following commit: commit 3696348c0b9c7d60caf7302411ec4c0298f56e57 Author: Christian Persch <chpe@gnome.org> Date: Fri Dec 4 20:10:04 2015 +0100 widget: Rework get_text() Ignore the passed VteSelectionFunc callback and just always use the whole passed range.
Created attachment 326361 [details] Screen recording of expected behavior
I'll have a look.
Created attachment 326362 [details] Screen recording of buggy behavior
(In reply to Robert Edmonds from comment #0) > In the single click selection mode, the first line of a multi-line selection > is replaced with a blank line when pasted. This is a regression from > previous versions where the copied text would match the visible selection. Hmm.. maybe I misunderstand the instructions to repro, but I cannot repro here (using vte-2.91 test app).
(In reply to Christian Persch from comment #4) > (In reply to Robert Edmonds from comment #0) > > In the single click selection mode, the first line of a multi-line selection > > is replaced with a blank line when pasted. This is a regression from > > previous versions where the copied text would match the visible selection. > > Hmm.. maybe I misunderstand the instructions to repro, but I cannot repro > here (using vte-2.91 test app). Hi, Christian: Did you have a look at the bad.webm screen recording? The easiest way is probably to take a terminal with several lines of non-empty text and single click and drag upwards, so that several whole lines of text are selected. If I click and drag on the extreme right side of the terminal I get whole lines of text selected at a time, without selecting only parts of the first or last lines. The first line of the selection should have text in it.
(In reply to Robert Edmonds from comment #5) > (In reply to Christian Persch from comment #4) > > (In reply to Robert Edmonds from comment #0) > > > In the single click selection mode, the first line of a multi-line selection > > > is replaced with a blank line when pasted. This is a regression from > > > previous versions where the copied text would match the visible selection. > > > > Hmm.. maybe I misunderstand the instructions to repro, but I cannot repro > > here (using vte-2.91 test app). > > Hi, Christian: > > Did you have a look at the bad.webm screen recording? > > The easiest way is probably to take a terminal with several lines of > non-empty text and single click and drag upwards, so that several whole > lines of text are selected. If I click and drag on the extreme right side of > the terminal I get whole lines of text selected at a time, without selecting > only parts of the first or last lines. The first line of the selection > should have text in it. That is, it only occurs when the beginning of the selection extends to the leftmost column of the first line, but only when that selection was made *without* actually starting or ending the click-and-drag selection on the leftmost column of the first line. It also doesn't occur at all when the beginning of the selection starts in the middle of a line.
Yup, confirmed. (Didn't read the description thoroughly, just watched the screencast :))
Ok, can repro now, by starting the selection on the right after the last character on a line.
I pushed a fix for this to master and 0-44, please test.
Looks okay so far, thanks!