aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-05-31 12:09:17 +0000
committerBlaž Hrastnik2021-05-31 12:09:17 +0000
commit2cc30cd07c8974e10423757899ac368cce3e3294 (patch)
tree223d95b8446e15f587c214d1d92dff327ae5c048 /helix-core
parent0dde5f2cae1f0520482ae0b7ca7f2283e8afca40 (diff)
Categorize _ as a word char, not punctuation
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/movement.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs
index dd300caa..ba2e92b9 100644
--- a/helix-core/src/movement.rs
+++ b/helix-core/src/movement.rs
@@ -189,10 +189,10 @@ fn categorize(ch: char) -> Category {
Category::Eol
} else if ch.is_ascii_whitespace() {
Category::Whitespace
+ } else if is_word(ch) {
+ Category::Word
} else if ch.is_ascii_punctuation() {
Category::Punctuation
- } else if ch.is_ascii_alphanumeric() {
- Category::Word
} else {
unreachable!()
}