multi_buffer: Remove redundant buffer id field (#43459)

It is easy for us to get the two fields out of sync causing weird
problems, there is no reason to have both here so.

Release Notes:

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

Co-authored by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Lukas Wirth
2025-11-25 17:13:16 +01:00
committed by GitHub
parent ab80ef1845
commit fafe1afa61
39 changed files with 378 additions and 306 deletions
@@ -284,7 +284,7 @@ impl DiagnosticBlock {
if range.context.overlaps(&diagnostic.range, &snapshot) {
Self::jump_to(
editor,
Anchor::range_in_buffer(excerpt_id, buffer_id, diagnostic.range),
Anchor::range_in_buffer(excerpt_id, diagnostic.range),
window,
cx,
);
+1 -1
View File
@@ -308,7 +308,7 @@ impl ProjectDiagnosticsEditor {
.selections
.all_anchors(&snapshot)
.iter()
.filter_map(|anchor| anchor.start.buffer_id)
.filter_map(|anchor| anchor.start.text_anchor.buffer_id)
.collect::<HashSet<_>>()
});
for buffer_id in buffer_ids {