diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index ec89e1f82186..4a27802d337b 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) }