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) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable The root cause is in this part of code: https://github.com/zed-industries/zed/blob/f5945344cc21ebff07eb7ea04dab0555fbe49007/crates/editor/src/editor.rs#L19446-L19464 The ranges across multibuffer are stored in the order of the HashMap iterator, which is not sorted at all. They are then consumed by `background_highlights_in_range()`, which uses a binary search that requires the ranges to be sorted: https://github.com/zed-industries/zed/blob/f5945344cc21ebff07eb7ea04dab0555fbe49007/crates/editor/src/editor.rs#L24127-L24135 The fix sorts the ranges by multibuffer anchor position before storing them. Release Notes: - Fixed missing background highlights in "Find All References" when results span multiple files.
1 file changedLine totals unavailable