GNOME Bugzilla – Bug 620235
Underscore should not be considered a word break
Last modified: 2010-09-23 20:20:08 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
*** This bug has been marked as a duplicate of bug 323711 ***
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?