mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-24 16:59:22 +03:00
Some actions read the content of the main view to the end before they act on it: the jump-to-file menu, going to the bottom, searching, and jumping to a file from the diffstat. If a re-render replaces the task while it reads, these actions are told that the content has been read although only a part of it has, so the menu lists only the files in that part. A background fetch re-renders the main view once a minute, so now and then the menu is incomplete. The same happens if a read is asked for after a render has been asked for but before its task has started. These actions act on the content of the task asked for last, so leave the reads waiting for content to that task. Hold them from the moment the task is asked for, hand over the ones a replaced task hasn't answered, including the one it was reading for, and answer them once the task asked for last has given the view all of its content. The replacing task still reads its own first lines first, so that the reads it takes over don't delay its first paint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>