diff options
Diffstat (limited to 'helix-core/src/movement.rs')
-rw-r--r-- | helix-core/src/movement.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs index c5e2df4a..96bbd54b 100644 --- a/helix-core/src/movement.rs +++ b/helix-core/src/movement.rs @@ -188,7 +188,9 @@ pub(crate) enum Category { Eol, Word, Punctuation, + Unknown, } + pub(crate) fn categorize(ch: char) -> Category { if ch == '\n' { Category::Eol @@ -199,7 +201,7 @@ pub(crate) fn categorize(ch: char) -> Category { } else if ch.is_ascii_punctuation() { Category::Punctuation } else { - unreachable!("unknown '{}' character category", ch) + Category::Unknown } } |