Unnamed repository; edit this file 'description' to name the repository.
fix(lsp): `find_completion_range` off-by-one (#11266)
RoloEdits 2024-07-24
parent 9d21b8f · commit 7c5e5f4
-rw-r--r--helix-lsp/src/lib.rs4
1 files changed, 1 insertions, 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)
}