After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 620235 - Underscore should not be considered a word break
Underscore should not be considered a word break
Status: RESOLVED DUPLICATE of bug 323711
Product: pango
Classification: Platform
Component: general
1.28.x
Other All
: Normal enhancement
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-01 09:31 UTC by Noam Yorav-Raphael
Modified: 2010-09-23 20:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Noam Yorav-Raphael 2010-06-01 09:31:13 UTC
The underscore ('_') character is currently considered a word break character. This means that when editing source code in gedit or any other GTK-based program, things like "a_multi_word_identifier" are considered to be made of several words, so double clicking in the middle selects only a part of the identifier, and several ctrl+right clicks are needed to go through the identifier.

I suggest to not consider the underscore a word separator, so when editing source code selection and movement will be as expected. Since there's no use for the underscore in real languages, there's no context in which it is used as a word separator, so I think this change is fine.

(I guess the change needs to be done in pango_default_break() - am I correct?)

Thanks,
Noam
Comment 1 Behdad Esfahbod 2010-09-23 19:36:55 UTC

*** This bug has been marked as a duplicate of bug 323711 ***
Comment 2 Noam Yorav-Raphael 2010-09-23 20:20:08 UTC
Can I ask why this is marked as a duplicate? bug 323711, from what I understand, deals with line breaking. Here the problem is *word* breaking, which happens even when there's only one line.

Also, I don't see a need for a custom function here - I think that the underscore should be default be considered as an alphanumeric character for word breaking purposes. Is there any reason not to do so?