mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
WIP
This commit is contained in:
parent
47ad9baebc
commit
068aa1adb3
1 changed files with 12 additions and 4 deletions
|
@ -61,11 +61,19 @@ impl Patch {
|
|||
}
|
||||
(Some(old_edit), Some(new_edit)) => {
|
||||
if old_edit.new.start <= new_edit.old.start {
|
||||
intermediate_end = old_edit.new.end;
|
||||
merge_edits(&mut pending_old_edit, old_edits.next().unwrap())
|
||||
if old_edit.new.start <= intermediate_end {
|
||||
intermediate_end = old_edit.new.end;
|
||||
merge_edits(&mut pending_old_edit, old_edits.next().unwrap())
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
intermediate_end = new_edit.old.end;
|
||||
merge_edits(&mut pending_new_edit, new_edits.next().unwrap());
|
||||
if new_edit.old.start <= intermediate_end {
|
||||
intermediate_end = new_edit.old.end;
|
||||
merge_edits(&mut pending_new_edit, new_edits.next().unwrap());
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue