Categorize _ as a word char, not punctuation
commit2cc30cd07c8974e10423757899ac368cce3e3294
authorBlaž Hrastnik <blaz@mxxn.io>
dateMon 31 May 2021, 21:09 (5 years ago)
parent0dde5f2
helix-core/src/movement.rs+2−2
@@ -189,10 +189,10 @@ fn categorize(ch: char) -> Category {
189189 Category::Eol
190190 } else if ch.is_ascii_whitespace() {
191191 Category::Whitespace
192+ } else if is_word(ch) {
193+ Category::Word
192194 } else if ch.is_ascii_punctuation() {
193195 Category::Punctuation
194− } else if ch.is_ascii_alphanumeric() {
195− Category::Word
196196 } else {
197197 unreachable!()
198198 }