style: remove whole-file addition and deletion backgrounds

This commit is contained in:
2026-10-11 11:26:17 +02:00
parent fc960ea0bf
commit f43a43fd53
2 changed files with 10 additions and 9 deletions
+9 -8
View File
@@ -1505,15 +1505,16 @@ fn draw_diff_pane(
let changed = matches!(row.kind, RowKind::Changed)
|| (before && row.kind == RowKind::Removed)
|| (!before && row.kind == RowKind::Added);
let background = if changed {
if before {
Color::Rgb(64, 24, 24)
let background =
if changed && !matches!(file.status, FileStatus::Added | FileStatus::Removed) {
if before {
Color::Rgb(64, 24, 24)
} else {
Color::Rgb(24, 48, 32)
}
} else {
Color::Rgb(24, 48, 32)
}
} else {
Color::Reset
};
Color::Reset
};
let text = if source_text.chars().any(|ch| ch.is_control() && ch != '\t') {
Cow::Owned(
source_text