mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 02:37:05 +00:00
Fix BlockMap unit test by skipping below blocks when advancing transforms
This commit is contained in:
parent
c9cbeafc05
commit
d6bc05cad0
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue