Fix duplicated multi-buffer excerpts (#29193)

- **add test case**
- **Merge excerpts more aggressively**
- **Randomized test for set_excerpts_for_path**

Closes #ISSUE

Release Notes:

- Fixed duplicted excerpts (and resulting panics)

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>
This commit is contained in:
Conrad Irwin 2025-04-21 23:25:09 -06:00 committed by GitHub
parent 458ffaa134
commit 3357736aea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 251 additions and 89 deletions

View file

@ -199,6 +199,9 @@ pub fn editor_content_with_blocks(editor: &Entity<Editor>, cx: &mut VisualTestCo
lines[row.0 as usize].push_str("§ ");
lines[row.0 as usize].push_str(block_lines[0].trim_end());
for i in 1..height as usize {
if row.0 as usize + i >= lines.len() {
lines.push("".to_string());
};
lines[row.0 as usize + i].push_str("§ ");
lines[row.0 as usize + i].push_str(block_lines[i].trim_end());
}