Closed Bug 1431672 Opened 6 years ago Closed 6 years ago

Provide a preference to determine whether underscore is treated as a letter during word selection

Categories

(Core :: DOM: Selection, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- wontfix
firefox60 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

We recently changed this behavior in bug 196175 to make double-click selection and arrow-key cursor movement treat multi_word_identifiers as single units.

However, some users (quite reasonably) preferred the old behavior; see bug 196175 comment 52 and following. While I don't want to add overhead or complexity to the code, I think a simple boolean preference "layout.word_select.stop_at_underscore" can be added without significant cost/complexity, and we should do this to allow users the choice.
I'm sympathetic to the users requesting a pref to control this, so I think we should add a simple boolean pref here. To minimize the runtime impact, the patch caches the pref in a static variable, so users will need to restart the browser to see the effect of changing it, but I think that's OK; it doesn't really need to be "live".
Attachment #8943894 - Flags: review?(m_kato)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8943894 - Flags: review?(m_kato) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4ac245899c5
Add a pref to control whether underscore is treated as a word-forming character. r=m_kato
https://hg.mozilla.org/mozilla-central/rev/a4ac245899c5
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: