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
+1 -1
View File
@@ -236,7 +236,7 @@ Editable After navigation stays within the shown source lines. At an excerpt bou
Configure these counts in Ruby with `config.diff_context_lines = 10` (nonnegative; `0` shows changes only) and `config.diff_expand_lines = 15` (positive). Configure these counts in Ruby with `config.diff_context_lines = 10` (nonnegative; `0` shows changes only) and `config.diff_expand_lines = 15` (positive).
Changed text rows use muted red backgrounds in Before and muted green backgrounds in After, including blank tails and real empty lines. Foreground colors use the editor's bundled Tree-sitter syntax highlighting, parsed independently for each snapshot and its path (including the old path for renames). Editable After also uses its live buffer's semantic highlighting, selections, and diagnostics. Unknown languages retain the normal foreground; historical snapshots do not borrow live-buffer LSP tokens. In split diffs, changed text rows use muted red backgrounds in Before and muted green backgrounds in After, including blank tails and real empty lines. Entirely added or deleted files retain the normal background; colored line numbers and `+`/`-` gutter markers indicate their changes. Foreground colors use the editor's bundled Tree-sitter syntax highlighting, parsed independently for each snapshot and its path (including the old path for renames). Editable After also uses its live buffer's semantic highlighting, selections, and diagnostics. Unknown languages retain the normal foreground; historical snapshots do not borrow live-buffer LSP tokens.
Missing counterparts use adjacent muted `╱` diagonals (U+2571, box drawings light diagonal) on the normal terminal background, one per column. Unlike the text slash `/`, this glyph is designed to reach cell corners so diagonals can join end to end across successive rows. Pixel-perfect joins depend on the terminal's font and line-spacing rendering. Actual empty source lines retain their normal/change background and are not hatched. Missing counterparts use adjacent muted `╱` diagonals (U+2571, box drawings light diagonal) on the normal terminal background, one per column. Unlike the text slash `/`, this glyph is designed to reach cell corners so diagonals can join end to end across successive rows. Pixel-perfect joins depend on the terminal's font and line-spacing rendering. Actual empty source lines retain their normal/change background and are not hatched.
+2 -1
View File
@@ -1505,7 +1505,8 @@ fn draw_diff_pane(
let changed = matches!(row.kind, RowKind::Changed) let changed = matches!(row.kind, RowKind::Changed)
|| (before && row.kind == RowKind::Removed) || (before && row.kind == RowKind::Removed)
|| (!before && row.kind == RowKind::Added); || (!before && row.kind == RowKind::Added);
let background = if changed { let background =
if changed && !matches!(file.status, FileStatus::Added | FileStatus::Removed) {
if before { if before {
Color::Rgb(64, 24, 24) Color::Rgb(64, 24, 24)
} else { } else {