From 75539ceced5eff3b622160382edb2accafd609b9 Mon Sep 17 00:00:00 2001 From: Satoshi Amemiya Date: Sat, 17 Jul 2021 00:42:16 +0900 Subject: [PATCH] make `_` as word component --- src/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buffer.rs b/src/buffer.rs index 752aa09..6679e0d 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -15,7 +15,7 @@ enum CharKind { impl CharKind { fn from_char(c: &char) -> Self { use CharKind::*; - if c.is_ascii_alphanumeric() { + if c == &'_' || c.is_ascii_alphanumeric() { return AlphaNumeric; }