From 18f2af88c99c3074785ee3384f280247fe6cb086 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Tue, 30 Jul 2024 15:40:22 -0400 Subject: [PATCH] fix behavior at end of line --- src/word.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/word.rs b/src/word.rs index 954f830..dcad8be 100644 --- a/src/word.rs +++ b/src/word.rs @@ -57,7 +57,7 @@ pub fn find_word_end_next(line: &str, start_col: usize) -> Option { cur_col = next_col; } // if end of line is whitespace, don't stop the cursor - if cur != CharKind::Space && cur_col.saturating_sub(start_col) > 1 { + if cur != CharKind::Space && cur_col.saturating_sub(start_col) >= 1 { return Some(cur_col); } None