jesseduffield.lazygit/pkg/commands/patch
Stefan Haller 4c123f9414 Add identity-based line accessors to PatchBuilder
The patch builder works in patch-line-index space, which the patch
explorer can supply directly from its parsed-patch state. The focused
main view can't: it only knows a selection as diff-line metadata
identities (file line number + deletion?), and those indices differ
between the raw diff and however a pager renders it.

Add the conversion at the boundary so the main view stays in identity
space: PatchLineIndicesForLines maps identities to indices (for
toggling) and IncludedLineIdentities reports the included change lines
as identities (for the inclusion gutter to match rendered rows against).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-08 12:59:00 +02:00
..
format.go Export PatchLine.isChange 2025-07-04 10:14:35 +02:00
hunk.go Recover diff-line identity by parsing the buffer, behind a swappable seam 2026-08-08 12:58:59 +02:00
parse.go Recover diff-line identity by parsing the buffer, behind a swappable seam 2026-08-08 12:58:59 +02:00
patch.go Recover diff-line identity by parsing the buffer, behind a swappable seam 2026-08-08 12:58:59 +02:00
patch_builder.go Add identity-based line accessors to PatchBuilder 2026-08-08 12:59:00 +02:00
patch_builder_test.go Add identity-based line accessors to PatchBuilder 2026-08-08 12:59:00 +02:00
patch_line.go Fix selection after staging an added line 2026-03-19 16:57:53 +01:00
patch_test.go Recover diff-line identity by parsing the buffer, behind a swappable seam 2026-08-08 12:58:59 +02:00
transform.go Show renamed files in the custom patch builder 2026-07-04 13:05:09 +02:00