From 7c5e5f4e412f65e123fe1e1fbc802229d1a303ae Mon Sep 17 00:00:00 2001 From: RoloEdits Date: Wed, 24 Jul 2024 08:34:20 -0700 Subject: [PATCH] fix(lsp): `find_completion_range` off-by-one (#11266) --- helix-lsp/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index ec89e1f8..4a27802d 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -284,10 +284,8 @@ pub mod util { if replace_mode { end += text .chars_at(cursor) - .skip(1) .take_while(|ch| chars::char_is_word(*ch)) - .count() - + 1; + .count(); } (start, end) }