mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
A patched pager (delta) prefixes each diff line with an OSC 456 sequence carrying that line's patch-space identity (see diff-line-metadata-notes.md), so the host can map a rendered row back to (file, type, new-line, old-line) without re-parsing -- the only way to recover the side for renderings that drop the +/- markers (delta's default mode). Recognize it in the escape interpreter and stamp the payload onto each cell, mirroring how OSC-8 hyperlinks are handled, exposing it via DiffLineMetadataInLine. To do so, generalize the OSC dispatch to accumulate the (possibly multi-digit) OSC number before branching, rather than matching the single character '8'; the OSC-8 path is unchanged for well-formed input. Unlike a hyperlink, the metadata sequence is never closed -- the pager re-emits one per line -- so clear it at each line boundary to keep it from bleeding onto a following line that has none (e.g. a hunk header). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||