diff --git a/crates/editor/src/display_map/block_map.rs b/crates/editor/src/display_map/block_map.rs index 0862e06ce4432e5544183a941b9128508f54c89b..e84f3fe41db62e9aad80d096dcb747da3c2f2b16 100644 --- a/crates/editor/src/display_map/block_map.rs +++ b/crates/editor/src/display_map/block_map.rs @@ -161,6 +161,13 @@ impl BlockMap { if edit.old.end > cursor.start().0 { cursor.seek(&InputRow(edit.old.end), Bias::Left, &()); cursor.next(&()); + while let Some(item) = cursor.item() { + if item.is_isomorphic() { + break; + } else { + cursor.next(&()); + } + } let transform_end = cursor.start().0; edit.new.end += transform_end - edit.old.end; edit.old.end = transform_end;