GNOME Bugzilla – Bug 340949
Underscore is not treated as a word character when doubleclick selecting
Last modified: 2007-01-10 13:54:30 UTC
In most programming languages, the underscore (_), if allowed, is treated as a part of the surrounding word, which enables variable or method names and so on with "spaces" in the name as in "title_without_section". Consequently, most editors treat underscore as a word character when doing syntax highlighting and when selecting whole words. This does not work in Gedit 2.14.2, Ubuntu Dapper development release. Examples: assert_respond_to(@page, 'title_without_section') Doubleclicking on assert_respond_to inside the respond-part will select only respond. Same thing inside the string. Triple-click selects whole row (good thing). Expected result: assert_respond_to or title_without_section are fully selected when doubleclicked.
I just realized something else: this probably should be a property of each supported language, with a good default for unrecognized format, and also ideally make a difference on what kind of word it is: Ruby, for instance, also allows ? and ! as parts of a method name. This is of course more of a special case and not as important, but if it affects how to implement it, I thought I better mention it.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 354587 ***