From 2cc30cd07c8974e10423757899ac368cce3e3294 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 31 May 2021 21:09:17 +0900 Subject: Categorize _ as a word char, not punctuation --- helix-core/src/movement.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-core') 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!() } -- cgit v1.2.3-70-g09d2