Fix names

This commit is contained in:
Andras Schmelczer 2025-07-06 12:40:26 +01:00
parent 98dc11896e
commit 6b6b16af3c
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
5 changed files with 13 additions and 21 deletions

View file

@ -257,15 +257,15 @@ where
match operation {
Operation::Equal { .. } => {
history.push(SpanWithHistory::new(History::Unchanged, builder.take()));
history.push(SpanWithHistory::new(builder.take(), History::Unchanged));
}
Operation::Insert { side, .. } => match side {
Side::Left => {
history.push(SpanWithHistory::new(History::AddedFromLeft, builder.take()));
history.push(SpanWithHistory::new(builder.take(), History::AddedFromLeft));
}
Side::Right => history.push(SpanWithHistory::new(
History::AddedFromRight,
builder.take(),
History::AddedFromRight,
)),
},
Operation::Delete {
@ -277,10 +277,10 @@ where
let deleted = self.text[*order..*order + *deleted_character_count].to_string();
match side {
Side::Left => {
history.push(SpanWithHistory::new(History::RemovedFromLeft, deleted));
history.push(SpanWithHistory::new(deleted, History::RemovedFromLeft));
}
Side::Right => {
history.push(SpanWithHistory::new(History::RemovedFromRight, deleted));
history.push(SpanWithHistory::new(deleted, History::RemovedFromRight));
}
}
}