# editor: Fix panic removing blocks in split diff with companion edit at EOF \(\#60445\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/9cdaff1492ce85a796dd845e83c6457a6be311da)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 9cdaff1492ce85a796dd845e83c6457a6be311da

Requested commit: 9cdaff1492ce85a796dd845e83c6457a6be311da

Commit: 9cdaff1492ce85a796dd845e83c6457a6be311da

Tree: bbcf59cc52c07705d5009734795ce944d247278a

Author: Lukas Wirth

Committer: GitHub

## Message

```
editor: Fix panic removing blocks in split diff with companion edit at EOF (#60445)

BlockMap::sync unwrapped the transform cursor for every edit, assuming
each edit's old.start lands strictly inside the old transform tree. The
companion (split-diff) branch of sync can compose an edit anchored at
the trailing boundary of the old transforms, leaving the cursor past the
end of the tree and aborting the process on the None unwrap. Only bind
the transform when there are rows preceding the edit.

Fixes ZED-9V4.
Closes FR-113


Release Notes:

- N/A or Added/Fixed/Improved ...
```

## Parents

- [0bc9c99f00c92befc855273fd7e662137a136191](https://git.cafe/gitcafe/zed/commit/0bc9c99f00c92befc855273fd7e662137a136191?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/9cdaff1492ce85a796dd845e83c6457a6be311da?format=markdown)
