Show excerpt dividers in without_headers multibuffers (#36647)

Release Notes:

- Fixed diff cards in agent threads not showing dividers between
disjoint edited regions.
This commit is contained in:
Cole Miller
2025-08-21 13:23:56 +00:00
committed by GitHub
parent ad64a71f04
commit f63d8e4c53
3 changed files with 122 additions and 84 deletions
+16 -19
View File
@@ -230,26 +230,23 @@ pub fn editor_content_with_blocks(editor: &Entity<Editor>, cx: &mut VisualTestCo
lines[row as usize].push_str("§ -----");
}
}
Block::ExcerptBoundary {
excerpt,
height,
starts_new_buffer,
} => {
if starts_new_buffer {
lines[row.0 as usize].push_str(&cx.update(|_, cx| {
format!(
"§ {}",
excerpt
.buffer
.file()
.unwrap()
.file_name(cx)
.to_string_lossy()
)
}));
} else {
lines[row.0 as usize].push_str("§ -----")
Block::ExcerptBoundary { height, .. } => {
for row in row.0..row.0 + height {
lines[row as usize].push_str("§ -----");
}
}
Block::BufferHeader { excerpt, height } => {
lines[row.0 as usize].push_str(&cx.update(|_, cx| {
format!(
"§ {}",
excerpt
.buffer
.file()
.unwrap()
.file_name(cx)
.to_string_lossy()
)
}));
for row in row.0 + 1..row.0 + height {
lines[row as usize].push_str("§ -----");
}