zed/crates/multi_buffer
Cole Miller 11371e6e1b
Fix panic in multi_buffer::Anchor::is_valid (#55644)
We check `is_valid` by seeking to the first excerpt that is `>=` the
anchor, and comparing the anchor to the excerpt's start and end. But we
were missing a check for the case where seeking puts us on an excerpt
for a different buffer, for example when the anchor to be checked is
past the end of the context range for its buffer's last excerpt.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed a panic in multibuffers.
2026-05-04 12:46:03 +00:00
..
src Fix panic in multi_buffer::Anchor::is_valid (#55644) 2026-05-04 12:46:03 +00:00
Cargo.toml Remove smol as a dependency from a bunch of crates (#53603) 2026-04-24 10:29:51 +00:00
LICENSE-GPL