mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-05 21:46:49 -04:00
The rule below the header of a branch's pull request is drawn as wide as the main view. Its width is read when the render is asked for, before the layout has settled it. If the layout then changes the width of the main view, for example because it unsplits the view for the content that comes next, the rule comes out as wide as the view used to be. Make a prefix a function that is called with the width the render is laid out to, once the layout has run. The function it returns produces the text on the render's own goroutine before the command starts. This way a prefix that takes a while to produce, such as one that runs commands of its own, holds up only the render and not the UI. All prefixes are still static here; the next commit lays out the rule of the pull request header to the width. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>