mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-15 10:06:26 -04:00
The patch package can already map a patch line index to its new-file line number and back (LineNumberOfLine / PatchLineForLineNumber). The diff-line parser being built on top of this needs the old-file equivalents: a deletion has no distinct new-file position (two consecutive deletions share one), so to land on the exact deletion when diving into staging we have to look it up by old-file line number. Add OldLineNumberOfLine and PatchLineForOldLineNumber as direct mirrors of the new-file functions, counting DELETION+CONTEXT lines instead of ADDITION+CONTEXT. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| format.go | ||
| hunk.go | ||
| parse.go | ||
| patch.go | ||
| patch_builder.go | ||
| patch_line.go | ||
| patch_test.go | ||
| transform.go | ||