mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 05:57:38 -04:00
The escape restore's mechanism — set a RenderRestore that scans the re-rendering content for a target patch identity and, once it loads, positions the view on the matched row — is about to gain a second caller: preserving a diff view's scroll/selection when its -U context size changes re-renders it (the sibling consumer of the diff-line primitive). That caller positions the row differently (put it back where it was, rather than scroll to and select it), so split the positioning out behind a `place` callback and keep the scan/swap machinery shared. Behaviour-preserving: RestoreFocusedMainViewOnEscape passes the same FocusPoint-and-select closure the inline Apply used. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>