jesseduffield.lazygit/pkg/tasks
Stefan Haller fbadbbf99a Don't scroll a view up to fill blank space while its content is loading
The layout scrolls a view up if its origin is past the bottom of its
content, to avoid showing blank space (e.g. after a resize). But it measures
content height by the lines loaded so far, and command/pty tasks load
asynchronously. So when a view is re-rendered while scrolled down, the layout
would yank it to the top because only a fraction of the content has been read
yet, then leave it there once loading finished.

Track whether a command task is actively reading (set synchronously when the
task is created, so a layout pass in between sees it; cleared at EOF, but not
when stopped, since that means a newer task is taking over) and skip the
scroll-up clamp for such views. onEndOfInput already re-clamps once loading
completes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-15 15:30:27 +02:00
..
async_handler.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
async_handler_test.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
tasks.go Don't scroll a view up to fill blank space while its content is loading 2026-08-15 15:30:27 +02:00
tasks_test.go Fire queued ReadToEnd callbacks when the initial read reaches EOF 2026-08-15 15:30:27 +02:00