lsp: Use replace edits for completions (#23490)
(Late) follow up to #9634. Fixes #23395 Release Notes: - Accepting completions while the cursor is in the middle of suggested completion will now result in smaller edits being applied.
This commit is contained in:
parent
55d99e0259
commit
3c0d05e362
1 changed files with 1 additions and 1 deletions
|
@ -2123,7 +2123,7 @@ pub(crate) fn parse_completion_text_edit(
|
|||
}
|
||||
|
||||
lsp::CompletionTextEdit::InsertAndReplace(edit) => {
|
||||
let range = range_from_lsp(edit.insert);
|
||||
let range = range_from_lsp(edit.replace);
|
||||
|
||||
let start = snapshot.clip_point_utf16(range.start, Bias::Left);
|
||||
let end = snapshot.clip_point_utf16(range.end, Bias::Left);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue