diff: Full width commit preamble
e0d32de9524f859c30729c5304020df4e8b6fcfd
1 parent
2cc9bde7
crates/diff/src/renderer.rs
+1 -1
| 928 | 928 | stack = stack.divider_cell(Cell::new(DIVIDER, Style::new(colors::FAINT))); |
|
| 929 | 929 | for line in message { |
|
| 930 | 930 | stack.push(line); |
|
| 931 | 931 | } |
|
| 932 | 932 | } |
|
| 933 | - | stack.lines(Constraint::max(Size::new(cols, usize::MAX))) |
|
| 933 | + | stack.lines(Constraint::tight(cols)) |
|
| 934 | 934 | } |
|
| 935 | 935 | ||
| 936 | 936 | /// Returns sticky file-header rows for the current offset. |
|
| 937 | 937 | fn sticky_rows(&self, scroll: usize, visible_rows: usize, cols: usize) -> Vec<Line> { |
|
| 938 | 938 | // Build the fixed sticky header strip directly from current scroll context. |
a.rs
+0 -0
a.rs
+0 -0
b.rs
+0 -0
a.rs
+0 -0
a.rs
+0 -0
a.rs
+0 -0
b.rs
+0 -0
src/a.rs
+0 -0
src/b.rs
+0 -0
README.md
+0 -0
a.rs
+0 -0
crates/diff/tests/golden/preamble_and_no_newline_64x17.txt
+10 -10
| 1 | - | ╭──────────────────────────────────────────────────╮ 🮘 |
|
| 2 | - | │ commit 1234567890abcdef1234567890abcdef12345678 │ 🮘 |
|
| 3 | - | │ author A <a@example.com> │ 🮘 |
|
| 4 | - | │ date Tue May 12 10:20:30 2026 +0200 │ 🮘 |
|
| 5 | - | ├──────────────────────────────────────────────────┤ 🮘 |
|
| 6 | - | │ Commit summary │ 🮘 |
|
| 7 | - | │ │ 🮘 |
|
| 8 | - | │ Message body text 1. │ 🮘 |
|
| 9 | - | │ Message body text 2. │ 🮘 |
|
| 10 | - | ╰──────────────────────────────────────────────────╯ 🮘 |
|
| 1 | + | ╭─────────────────────────────────────────────────────────────╮🮘 |
|
| 2 | + | │ commit 1234567890abcdef1234567890abcdef12345678 │🮘 |
|
| 3 | + | │ author A <a@example.com> │🮘 |
|
| 4 | + | │ date Tue May 12 10:20:30 2026 +0200 │🮘 |
|
| 5 | + | ├─────────────────────────────────────────────────────────────┤🮘 |
|
| 6 | + | │ Commit summary │🮘 |
|
| 7 | + | │ │🮘 |
|
| 8 | + | │ Message body text 1. │🮘 |
|
| 9 | + | │ Message body text 2. │🮘 |
|
| 10 | + | ╰─────────────────────────────────────────────────────────────╯🮘 |
|
| 11 | 11 | ╭─────────────────────────────────────────────────────────────╮🮘 |
|
| 12 | 12 | │ ⊙ a.rs +1 -1 │🮘 |
|
| 13 | 13 | ├─────────────────────────────────────────────────────────────┤🮘 |
|
| 14 | 14 | │ 1 - old │🮘 |
|
| 15 | 15 | │ 1 + new │🮘 |