mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-05 21:46:49 -04:00
A re-render builds into an off-screen buffer and swaps it in when it has read enough to paint. Deciding where the new content should be shown means reading it before that swap: afterwards it is on screen already, and whatever we then scroll to has been seen at the wrong position first. So expose the off-screen buffer's diff-line contents and line count, the latter for telling when a line found there has a screenful below it. The contents come in two forms, the whole buffer and everything from a given line on, so that a reader following the render as it loads can look at each line once instead of re-reading the buffer per line. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>