mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 14:06:32 -04:00
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>