on master help sign in
Categorize _ as a word char, not punctuation
2cc30cdBlaž Hrastnik
helix-core/src/movement.rs+2−2
@@ -189,10 +189,10 @@ fn categorize(ch: char) -> Category {
189 Category::Eol
189 Category::Eol
190 } else if ch.is_ascii_whitespace() {
190 } else if ch.is_ascii_whitespace() {
191 Category::Whitespace
191 Category::Whitespace
192+ } else if is_word(ch) {
193+ Category::Word
192 } else if ch.is_ascii_punctuation() {
194 } else if ch.is_ascii_punctuation() {
193 Category::Punctuation
195 Category::Punctuation
194− } else if ch.is_ascii_alphanumeric() {
195− Category::Word
196 } else {
196 } else {
197 unreachable!()
197 unreachable!()
198 }
198 }