From 24773ac217de4982a21465f24d70fd288bba516f Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Sat, 22 Oct 2022 19:08:36 +0800 Subject: [PATCH] fix: list_op delete merge error --- crates/loro-core/src/container/list/list_op.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/loro-core/src/container/list/list_op.rs b/crates/loro-core/src/container/list/list_op.rs index f5286de4..bfd10f84 100644 --- a/crates/loro-core/src/container/list/list_op.rs +++ b/crates/loro-core/src/container/list/list_op.rs @@ -23,7 +23,7 @@ impl Mergable for ListOp { _ => false, }, ListOp::Delete { pos, len } => match _other { - ListOp::Delete { pos: other_pos, .. } => pos + len == *other_pos, + ListOp::Delete { pos: other_pos, .. } => *pos == *other_pos, _ => false, }, }