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
+2 -10
View File
@@ -490,11 +490,7 @@ impl EditorTestContext {
);
assert_eq!(
multibuffer_snapshot
.text_for_range(Anchor::range_in_buffer(
excerpt_id,
snapshot.remote_id(),
range.context.clone()
))
.text_for_range(Anchor::range_in_buffer(excerpt_id, range.context.clone()))
.collect::<String>(),
expected_text,
"{}",
@@ -675,11 +671,7 @@ impl std::fmt::Display for FormatMultiBufferAsMarkedText {
}
let mut text = multibuffer_snapshot
.text_for_range(Anchor::range_in_buffer(
*excerpt_id,
snapshot.remote_id(),
range.context.clone(),
))
.text_for_range(Anchor::range_in_buffer(*excerpt_id, range.context.clone()))
.collect::<String>();
let selections = selections