Hyphen incorrectly counting as word character
Rockster160 opened this issue · comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
When selecting a word/traversing words in any css file, it no longer respects a hyphen as a non-word character.
Steps to Reproduce
- Add a selector with a hyphen to any CSS file.
- Place cursor inside of one of the words
CMD+D
/Editor: Select Word
to select the word- It selects the entire selector instead of only the expected word. 😞
Expected behavior:
For the class: "my-container" with your cursor on the word container, Editor: Select Word
should highlight/select ONLY container
.
Actual behavior:
Currently selects the entire "my-container" selector. Not only is this not expected, it's also inconsistent with other similar languages. (HTML/JS packages)
Reproduces how often: 100%
Versions
MacOS High Sierra : 10.13.6
Atom : 1.29.0
Electron: 2.0.5
Chrome : 61.0.3163.100
Node : 8.9.3
language-css : 0.42.11
Same goes for double clicking.
A few months ago (I can't quite remember what version this happened) Atom didn't have this issue. Was this intentional, or is it a bug?
@hugobaeta - I think this was intentional as a hack to get around another bug where hyphenated words weren't being auto-completed properly. I don't personally see breaking current functionality to try to atone for that as the right solution though, personally. 😕
@Rockster160 I see. Well, I can tell you that if you work with BEM naming convention, not being able to quickly select portions of the selector is super annoying :D
Completely agreed, which is why I think this should definitely be classified as a bug that needs fixing.
I am having exactly this same issue. Are there any updates or fixes on this?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.