style: remove whole-file addition and deletion backgrounds
This commit is contained in:
+1
-1
@@ -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.
|
||||||
|
|
||||||
|
|||||||
+9
-8
@@ -1505,15 +1505,16 @@ 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 before {
|
if changed && !matches!(file.status, FileStatus::Added | FileStatus::Removed) {
|
||||||
Color::Rgb(64, 24, 24)
|
if before {
|
||||||
|
Color::Rgb(64, 24, 24)
|
||||||
|
} else {
|
||||||
|
Color::Rgb(24, 48, 32)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Color::Rgb(24, 48, 32)
|
Color::Reset
|
||||||
}
|
};
|
||||||
} else {
|
|
||||||
Color::Reset
|
|
||||||
};
|
|
||||||
let text = if source_text.chars().any(|ch| ch.is_control() && ch != '\t') {
|
let text = if source_text.chars().any(|ch| ch.is_control() && ch != '\t') {
|
||||||
Cow::Owned(
|
Cow::Owned(
|
||||||
source_text
|
source_text
|
||||||
|
|||||||
Reference in New Issue
Block a user