I "love" how much people still complain and fail to understand the
previous comments...

So let me try it once again...

Double clicking, by design, is _not_ meant to select URLs.

Double clicking selects a continuous sequence of certain (configurable)
characters, and it has do be able to do this even when you double click
outside of a URL.

At one point this configurability was removed, but due to popular demand
(that is: plenty of complaints) it was brought back in the very next
version (alas as a hidden setting, without a UI).

There were many debates around what the default set of such characters
should be, and the reason it is configurable is because there's no
single right answer, it's a matter of taste, or rather, a matter of use
cases. The only clear conclusion was that generally it's better to have
fewer characters in the set rather than more, that is, double clicking
should rather select shorter segments than long ones. This is because if
it selects a shorter section than desired, it is still easy to double-
click and then drag the mouse to extend it by other sections, whereas
the other way around this cannot be done.

This was the reason behind the removal of ":" from the default set, and
continuing this trend if we were to change anything, it would much
rather be the removal of "/" too rather than adding ":" back.

If we removed "/" too, it would mean that double clicking on a URL would
highlight even much shorter parts of it: either the hostname only, or
one path component only. Would you still complain then that it's broken,
or would it be more obvious to you and easier for you to accept that
double clicking is not designed for selecting a URL?

As stated above, if you add ":" to the set (which you can do easily), it
would still not perfectly select URLs, there would be differences
("bugs" if you will). Double clicking behavior is very simple: certain
characters are selected, while the rest are not, without looking at the
larger picture. URLs, on the other hand, are waaaay more complex to
detect. See https://git.gnome.org/browse/gnome-terminal/tree/src
/terminal-regex.h?h=gnome-3-22 to get an idea how crazily heavily
complex the regular expressions are, and it's still not perfect (it's
not even possible to get it perfect since it's not defined anywhere how
to detect the boundaries of a URL in a text flow), but is quite good.

Theoretically the code could be changed to select based on characters
when double clicking outside a URL, and the entire URL when clicking
inside. But this dual behavior would be even more confusing (i.e.
broken). Then the currently available and luckily configurable set of
word characters would be ignored within URLs (and what if let's say you
actually wanted to easily highlight parts of the URL and hence you
removed "/" from wordchars? you'd find that it doesn't work) whereas
you'd get another way of copying the URL for which you already have one
method.

Also, beginning with Yakkety gnome-terminal recognizes numbers, and even
though (as opposed to URLs) it doesn't highlight them on mouseover, it
provides useful information on a right click. So then should this one
also modify the double click behavior to stop at number boundaries? Why
or why not?

There is a way to conveniently copy an entire URL, and this is in the
right-click menu.

Double clicking was never meant to do this, and modifying double
clicking to do this would cause more harm than good, or at the very
least definitely more inconsistency and less configurability.

Adding ":" back to the list of word chars wouldn't fix the issue (there
would still be cases when the URL is not detected properly) and would
cause other problems elsewhere.

Seriously, the only reasonable thing I can imagine to do is to remove
the "/" from the default set to make it even more obvious that double
clicking on a URL is not broken, it is intended to do something entirely
different, something unrelated to URL recognition.

So, guys, there's nothing to see here. Please move on.

Use every feature for what it was designed for. Double click to select
the continuous region of characters out of a given configurable set.
Right click -> Copy Link Address to copy the URL.

This bug should be closed as invalid.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1501250

Title:
  double clicking on a URL drops the protocol from the URL

To manage notifications about this bug go to:
https://bugs.launchpad.net/vte/+bug/1501250/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to