Fix BlockMap unit test by skipping below blocks when advancing transforms

This commit is contained in:
Nathan Sobo 2021-11-13 18:19:21 -07:00
parent c9cbeafc05
commit d6bc05cad0

View file

@ -161,6 +161,13 @@ impl BlockMap {
if edit.old.end > cursor.start().0 { if edit.old.end > cursor.start().0 {
cursor.seek(&InputRow(edit.old.end), Bias::Left, &()); cursor.seek(&InputRow(edit.old.end), Bias::Left, &());
cursor.next(&()); cursor.next(&());
while let Some(item) = cursor.item() {
if item.is_isomorphic() {
break;
} else {
cursor.next(&());
}
}
let transform_end = cursor.start().0; let transform_end = cursor.start().0;
edit.new.end += transform_end - edit.old.end; edit.new.end += transform_end - edit.old.end;
edit.old.end = transform_end; edit.old.end = transform_end;