highlighting on left mouse double click ends at : (colon)

Bug #1463072 reported by Scott Moser
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
GNOME Terminal
Invalid
Medium
gnome-terminal (Fedora)
Confirmed
Undecided
gnome-terminal (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

I'm not perfectly sure when this regression occurred. I know that 3.14.2-0ubuntu4 did not have the issue, and that 3.16.2-1ubuntu1 does.

Its terribly annoying when copy and pasting links.

I'm not sure how this works or where the change occurred.
When i double click on a url (http://example.com/path)
its selection stops at the ':'. This means i keep pasting people urls that look like /paste.ubuntu.com/11591324/ rather than http://paste.ubuntu.com/11591324/ .

Note, mouse over the url *does* underline the whole url.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: gnome-terminal 3.16.2-1ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-20.20-generic 3.19.8
Uname: Linux 3.19.0-20-generic x86_64
ApportVersion: 2.17.3-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jun 8 11:11:02 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-01-02 (156 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150101)
SourcePackage: gnome-terminal
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Florian (florian-redhat-bugs) wrote :

Description of problem:

Double-clicking on a URL displayed in a terminal, such as “https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora”, only selects “//bugzilla.redhat.com/enter_bug.cgi?product=Fedora”, and not the scheme part.

Version-Release number of selected component (if applicable):

gnome-terminal-3.16.2-1.fc22.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. echo https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora
2. Double-click on “redhat”.

Actual results:

“//bugzilla.redhat.com/enter_bug.cgi?product=Fedora” is selected.

Expected results:

http://bugzilla.redhat.com/enter_bug.cgi?product=Fedora” is selected.

Additional info:

The expected result is what happened with Fedora 21.

Revision history for this message
In , Egmont (egmont-redhat-bugs) wrote :

See
bug 1208869
https://bugzilla.gnome.org/show_bug.cgi?id=727743
https://bugzilla.gnome.org/show_bug.cgi?id=730632

URL detection (underlining on mouseover, context menu, ctrl+click) has nothing to do with the word boundary (double click) behavior, these are two unrelated parts of the code. The colon character is not part of the default set of wordchars, see those discussions for rationale. It's unfortunate for URLs, but adds much more to usability elsewhere. And you can configure it for yourself.

Revision history for this message
Scott Moser (smoser) wrote :
Changed in gnome-terminal:
importance: Unknown → Medium
status: Unknown → Confirmed
Scott Moser (smoser)
Changed in gnome-terminal (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Scott Moser (smoser)
Changed in gnome-terminal (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Scott Moser (smoser) wrote :

I marked this as Invalid as upstream says it is.
It is configurable via dconf. currently not configurable in the gnome-terminal UI at all.

To show how to do this:

$ dconf read /org/gnome/terminal/legacy/profiles:/list
['63575bfd-baa0-4acd-86fc-6726b91ff51e', 'bdddb09c-01fe-4230-90b0-331af6389b5f']

$ dconf read /org/gnome/terminal/legacy/profiles:/:63575bfd-baa0-4acd-86fc-6726b91ff51e/visible-name
'default'

$ dconf write /org/gnome/terminal/legacy/profiles:/:63575bfd-baa0-4acd-86fc-6726b91ff51e/word-char-exceptions '@ms "-,:.;/?%&#_=+@~·"'

I believe the default is: -,:.;/?%&#_=+@~.
and I just added ':' to the list.

Changed in gnome-terminal:
status: Confirmed → Invalid
Revision history for this message
Dan Watkins (oddbloke) wrote :

Scott's workaround doesn't work for me; I don't get any output when I run `dconf read /org/gnome/terminal/legacy/profiles:/list`.

I'm reopening this, because I think it will be painful for a _lot_ of Ubuntu users.

Changed in gnome-terminal (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Iain Lane (laney) wrote :

Use right click -> Copy Link Address until we get UI.

Changed in gnome-terminal (Ubuntu):
status: Confirmed → Won't Fix
Scott Moser (smoser)
summary: - highlighting on left mouse double click ends at :
+ highlighting on left mouse double click ends at : (colon)
Revision history for this message
Christian Reis (kiko) wrote :

This is a dupe of bug 1501250, but I'm not sure in which direction to duplicate it.

Revision history for this message
Christian Reis (kiko) wrote :

Hmm, actually, that is for vte, this one for gnome-terminal, but they both use the same underlying mechanism.

Revision history for this message
In , Georg (georg-redhat-bugs) wrote :

The tl;dr on how to fix this:

Get id of default profile:

    pid=$(dconf read /org/gnome/terminal/legacy/profiles:/default | tr -d "'")

Remove the boundary property of some additional characters:

    dconf write /org/gnome/terminal/legacy/profiles:/:$pid/word-char-exceptions '@ms "-=&#:/.?@+~_%;"'

Where the `@ms` denotes the maybe-string gvariant type.

With that a double-click should select URLs like:

    http://foo-bar.example.org/query.html#xyz?key1=value1&key2=value2

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Revision history for this message
In , Christophe (christophe-redhat-bugs) wrote :

Still happening with f24

Revision history for this message
In , Sandro (sandro-redhat-bugs) wrote :

Still happening with fc25

Revision history for this message
In , Egmont (egmont-redhat-bugs) wrote :

It's not a bug. It's a faulty expectation from the users.

See my previous comment, follow the links from there, and see also https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1501250 for a more verbose explanation.

Changed in gnome-terminal (Fedora):
importance: Unknown → Undecided
status: Unknown → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

For my reference later.
The 'dconf read' with ':list' syntax has changed, so the comments above don't work in 18.04.

Updated, this worked for me:

$ dconf list /org/gnome/terminal/legacy/profiles:/
:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/

$ dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/word-char-exceptions '@ms "-=&#:/.?@+~_%;"'

For a copy and paste single line, that'd look like this:

$ for profid in $(dconf list /org/gnome/terminal/legacy/profiles:/); do dconf write /org/gnome/terminal/legacy/profiles:/${profid%/}/word-char-exceptions ; done

Revision history for this message
Scott Moser (smoser) wrote :

this worked for me to set all profiles as I wanted in 20.04

$ val='@ms "-,:.;/?%&#_=+@~·"'
$ profids=$(dconf list /org/gnome/terminal/legacy/profiles:/ | grep -v ^list$)
$ for profid in $profids; do dconf write /org/gnome/terminal/legacy/profiles:/${profid%/}/word-char-exceptions "$val"; done

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.