tui: align diff display by always showing sign char and keeping fixed gutter (#2353)

diff lines without a sign char were misaligned.
This commit is contained in:
Jeremy Rose
2025-08-15 12:32:45 -04:00
committed by GitHub
parent 265fd89e31
commit 45d6c74682
4 changed files with 30 additions and 15 deletions

View File

@@ -1,13 +1,14 @@
---
source: tui/src/diff_render.rs
assertion_line: 380
expression: terminal.backend()
---
"proposed patch to 1 file (+1 -1) "
" └ src/lib.rs → src/lib_new.rs (+1 -1) "
" 1 line one "
" 1 line one "
" 2 -line two "
" 2 +line two changed "
" 3 line three "
" 3 line three "
" "
" "
" "

View File

@@ -1,9 +1,10 @@
---
source: tui/src/diff_render.rs
assertion_line: 380
expression: terminal.backend()
---
" 1 +this is a very long line that should wrap across multiple terminal col "
" umns and continue "
" umns and continue "
" "
" "
" "