implement UAX29-like word boundary detection for double-click select-by-word
@egmontkob
Submitted by Egmont Koblinger Link to original bug (#730632)
Description
Double clicking selects too much, making is quite useless, and is no longer configurable.
When double clicking, all punctuation characters count as word chars. This makes it very hard to select e.g. a method name from a source code, since you'll end up having much more in the buffer than you wanted. E.g. consider this line of source code:
vte_same_class(VteTerminal *terminal, glong acol, glong arow,
I can't select the word "vte_same_class" or "terminal" with double click, since I'll end up having "vte_same_class(VteTerminal" or "*terminal," in the buffer instead.
This makes double click quite useless, I have to select with a single click, precisely marking both the start and the end. It would be much easier the other way around. E.g if selecting stopped at parentheses but I wanted to select "vte_same_class(VteTerminal", I could easily do it by double-clicking anywhere under "vte_same_class" and releasing anywhere under "VteTerminal". So I believe stopping at most punctuation characters would heavily improve usability.
This is also the way most applications behave (like browsers, gedit etc.) They stop at most punctuation chars. (I'm not sure if there's a Unicode standard for this, or if there's a Gtk+ method we could use.)
(Or, the word-chars feature could be resurrected, probably with two sets of characters, one to add to word-chars, one to remove from there.)
Version: 0.37.x