Disable diff hunks for untracked files, even w/ no newline at eof (#25980)

This fixes an issue where diff hunks were shown for untracked files, but
only if the files did not end with a newline.

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld 2025-03-03 22:18:27 -08:00 committed by GitHub
parent 11b79d0ab9
commit 563baf682e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 34 additions and 41 deletions

View file

@ -2274,7 +2274,7 @@ impl ReferenceMultibuffer {
}
if !hunk.buffer_range.start.is_valid(&buffer) {
log::trace!("skipping hunk with deleted start: {:?}", hunk.row_range);
log::trace!("skipping hunk with deleted start: {:?}", hunk.range);
continue;
}