mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-05 21:46:49 -04:00
During an interactive rebase, scrolling down far enough that the pending todos leave the screen makes the author and subject of every commit jump to the left; scrolling back up makes them jump back. During a bisect the column that holds "<-- current" and "?" comes and goes the same way, and in the expanded commits panel the date column is only as wide as gui.shortTimeFormat while nothing but today's commits is on screen. A column is as wide as the widest string in it, and a column whose strings are all empty is dropped altogether. The commits and sub-commits panels render only the lines that are on screen, so those widths come from the visible lines alone and follow the scroll position. Pad the hash, bisect, action and date cell of every line to the width that all the commits in the list need. A padded cell is no longer empty, so its column is never dropped, and the column is already as wide as the whole list needs, so its width no longer depends on what is visible. The date column is the exception. Formatting the date of every commit on every render costs too much, so it measures the oldest commit only. That covers the conventional time formats; getReservedColumnWidths says what it misses, and why it can never reserve width that no commit asks for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>