Typically on Mac, double clicking a dash separated “word” ( like-this-example ) will only select the clicked segment up until a dash. (Double click example and you’d get like-this-example with the bold text showing the selection.)
This is unexpected for some of our users. Is there a simple way to change that or does it require making your own CSS LRLanguage (and any CSS based language) to override the wordChar option?
And if you do override the wordChar option, what other features does that affect?
There wasn’t, but that wouldn’t do, so now there is.
Anything that works with words, like by-word cursor motion, will be affected by this.
(It’s not always necessary to change something as soon as a user complains. Being able to select entire identifiers by double clicking is really quite convenient.)
Actually, ignore that patch I linked. It is very broken. With @codemirror/state 6.5.3 you can now add a higher-precedence bit of language data (cssLanguage.data.of({wordChars: ""})) to your configuration to override the default word characters.
Thanks for the quick response & solution! That’s a much better way to patch this. We’ll do some testing and see if we want to offer this by default or via an option for users.