Bug 1180987 - triple-clicking select-line in white space selects an additional unrelated line
Summary: triple-clicking select-line in white space selects an additional unrelated line
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-terminal
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-12 05:40 UTC by Trevor Cordes
Modified: 2015-11-04 22:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 22:12:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Trevor Cordes 2015-01-12 05:40:19 UTC
Description of problem:
Fedora 21's gnome-terminal now has majorly broken the triple-clicking to select whole lines feature.  When you triple-click it often selects two unrelated lines instead of just the one.  In F19 it would sometimes get it wrong, but 90%+ of the time it would get it right.  In F21 it gets it wrong at least half the time.  My hunch is it is aggravated by the new line-wrap-redo-on-resize feature.


Version-Release number of selected component (if applicable):
gnome-terminal-3.14.2-2.fc21.x86_64


How reproducible:
Always if you follow my instructions.  50%+ of the time if you just do it randomly during your work.


Steps to Reproduce:
1. open a new gnome-terminal
2. triple-click the blank area of the top line where your prompt is, or even any blank line on the new blank term

Actual results:
line 1 + line 2 both selected

Expected results:
select just line 1

Additional info:
I don't think it's a wm thing, but just in case, I'm using sawfish-1.11-1.fc21.x86_64 and xfce (4.10.1-7.fc21.x86_64).

Comment 1 Trevor Cordes 2015-01-12 05:47:03 UTC
Update: it appears that the bug only (always?) hits when you select the unfilled blank area of a line.  If you triple-click on some text on the line then the bug does not happen.  I hope this isn't a "feature", as I often select lines with barely any text on them by clicking the blank area just to the right of it.  I find it easier to pinpoint.  Besides, selecting the next line as well doesn't make any sense as a "feature".

Interestingly, try these variations:
launch gnome-terminal
launch nano
type (change \n to nl's):   1\n2\n\n\n\n3\n4\n

triple-click (tc) on the "1" character, OK
tc on the space (really a nl) to the right of the "1", OK
tc on the space two spaces to the right of the "1", BUG
tc on the first char space area of one of the blank lines, OK
tc on the 2nd char space area of one of the blank lines, BUG
tc and drag from a buggy area down and the moving-selection box always is one longer than where the mouse pointer is, BUG(!!!)

Comment 3 Trevor Cordes 2015-01-14 06:52:30 UTC
Those bugs look somewhat related, but not exact.  Fixing those may fix this one too, maybe.

New update on my bug: it's even buggier than I described:

- in a text editor add lines like this:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b
c
d
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

- tc anywhere on the a's, keep holding them button down, all is OK
- while still dragging/holding, move mouse down over b line where there is empty space: your selection now includes all of a b *AND* c lines! BUG
- repeat above, but this time move mouse down over b line where there is the b character (not over empty space), all is OK!

Comment 4 Egmont Koblinger 2015-01-14 09:37:33 UTC
Last time I took a look at the code my impression was that it's probably not just a few off-by-ones, probably the whole highlight code should be thrown out and reimplemented :)

Comment 5 Paul Wouters 2015-01-17 23:30:53 UTC
I just figured this one out too. I see I'm not the first one :/

You don't mean re-implemented, but restore the old implementation that worked fine.

Comment 6 Egmont Koblinger 2015-01-18 16:58:05 UTC
Fixed upstream.

Comment 7 Fedora End Of Life 2015-11-04 14:05:50 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.