mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-05 21:46:49 -04:00
Wrapping the content at another width moves every line of it to a different view line. The positions into the view are all view lines: the scroll offset, the cursor, a range's anchor. Each of them is then left pointing at a line it was never on. Committing the last of the staged changes widens the main view by half a screen, and that moves a selected hunk somewhere else entirely. Carry the positions through the lines of content they were on. A position always meant a line of content rather than a view line. The line the cursor is on keeps the row it was drawn on, so it stays in front of the user rather than the view scrolling under it; a view with no cursor on screen keeps its own place instead. A range's ends go on the outermost segments of their lines, since a range covers lines of content and not the segments those lines are drawn as. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>