Test for filtering out of faulty LSP completion additional edits

This commit is contained in:
Julia 2022-11-11 10:28:07 -05:00
parent 44c3cedc48
commit ad698fd110
2 changed files with 34 additions and 15 deletions

View file

@ -3481,6 +3481,8 @@ impl Project {
let end_within = range.start.cmp(&primary.end, buffer).is_le()
&& range.end.cmp(&primary.end, buffer).is_ge();
//Skip addtional edits which overlap with the primary completion edit
//https://github.com/zed-industries/zed/pull/1871
if !start_within && !end_within {
buffer.edit([(range, text)], None, cx);
}