GNOME Bugzilla – Bug 746307
Double click could stop at color/attribute change
Last modified: 2021-06-10 15:01:02 UTC
We could modify the double click behavior: in addition to character classes, it could also look at the attributes (color, bold/italic etc.) and stop where it changes. This could be useful in a number of scenarios, e.g. with a text editor that's aware of the grammar of the file and uses syntax highlighting, this could result in a better per-language behavior. E.g. they'd know that \n is a token of two characters that are strongly coupled together, and a double click would select them accordingly. Also, highlighted output of certain tools (e.g. grep, gcc) could result in better experience. E.g. I just grepped from a CSV file where some entries contained a ':', now it would have been handy to treat those colons as wordchars, but not grep's filename terminating colon (which we could detect because it's in a different color). Certain fullscreen apps use colors to separate different fields from each other, e.g. mc's bottom row (there are probably better real life examples). Of course I'm sure this feature would have drawbacks, too. If nothing else then just the mere fact that it's an unusual behavior could be misleading. Anyway, we could think about and experiment with this idea.
Apropos colons as wordchars ... I was just now looking for a bug report why this behaviour changed. Since gnome-terminal 3.16 it breaks words at colons. Is this configurable? It’s very annoying for so many things. IPv6 addresses, URLs, and it goes on. I know that sometimes it’s annoying like for "grep -l", but most of the time colon as no wordchar is preferred.
See bug 730632, esp. comments 33 & 37.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vte/-/issues/2179.