Allow unfolding deleted buffers in project diff w/ keyboard (#25835)

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2025-02-28 16:02:35 -08:00 committed by GitHub
parent ec88a6886f
commit 1c4c568068
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 10 deletions

View file

@ -3541,7 +3541,9 @@ impl MultiBufferSnapshot {
cursor.seek(&range.start);
std::iter::from_fn(move || {
let region = cursor.region()?;
if region.range.start >= range.end {
if region.range.start > range.end
|| region.range.start == range.end && region.range.start > range.start
{
return None;
}
cursor.next_excerpt();