mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 05:57:38 -04:00
Ignoring whitespace is how you ask whether what you are looking at is more than reindentation, so being dropped at the top of the diff is a poor answer: you have to find your way back to the change you were asking about to see what became of it. Unlike the other ways of re-rendering a diff, this one can take the line you were on away for good, along with the hunk or even the file it was in. When it does, the view lands on the nearest line the diff kept, wherever in it that is — the walk of fallbacks doesn't stop at the file's edge, since a file of nothing but reindentation leaves nothing nearer to land on. And when ignoring whitespace empties the diff altogether, there is nothing to keep and the view simply shows what is left. A whitespace-only change that shares a hunk with a real one is a happier case: it is shown as a context line rather than as a change, but it is still the same line of the same file, so we stay on it. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>