mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Fix resolving of multiple edits at a location
This commit is contained in:
parent
b6ab4c2d65
commit
104b5ef882
1 changed files with 4 additions and 4 deletions
|
@ -399,10 +399,10 @@ impl PatchStore {
|
|||
|
||||
located_edit.input_ix = input_edit_ix;
|
||||
|
||||
match new_buffer
|
||||
.edits
|
||||
.binary_search_by_key(&&located_edit.range.start, |edit| &edit.range.start)
|
||||
{
|
||||
match new_buffer.edits.binary_search_by_key(
|
||||
&(located_edit.range.start, located_edit.range.end),
|
||||
|edit| (edit.range.start, edit.range.end),
|
||||
) {
|
||||
Ok(ix) => new_buffer.edits[ix] = located_edit,
|
||||
Err(ix) => new_buffer.edits.insert(ix, located_edit),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue