Expand description
Diff preview renderer — native ratatui Line/Span output.
Takes structured DiffPreview data from koda-core and produces
Vec<Line<'static>> with:
- Proper unified diff with hunk headers and context lines
- Syntax highlighting with cross-hunk context (via pre-highlighted files)
- Dark background tint for diff lines (red removed, green added)
- Gutter metadata for NoSelect copy support
Constants§
- GUTTER_
WIDTH - Width of the gutter: 4-digit line number + space + sigil + space = 7. Used by NoSelect to know how many leading columns to skip on copy.
Functions§
- render_
lines - Render a
DiffPreviewas native ratatuiLines.