mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 21:28:51 +00:00
Update crates/text_edit/src/lib.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
parent
83927e08a8
commit
e8416bb644
1 changed files with 2 additions and 1 deletions
|
@ -123,7 +123,8 @@ impl TextEdit {
|
|||
|
||||
self.indels.extend(other.indels);
|
||||
check_disjoint_and_sort(&mut self.indels);
|
||||
self.indels.dedup();
|
||||
// Only dedup deletions and replacements, keep all insertions
|
||||
self.indels.dedup_by(|a, b| a == b && !a.delete.is_empty());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue