mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
After staging or unstaging from the focused main view, focus stayed on the pane the user acted in even when the side they were acting on moved to the other pane. Two cases got it wrong: - Unstaging the first hunk of an only-staged file splits the diff: the main half flips to show the just-unstaged change, and the staged remainder jumps to the secondary half — but focus stayed on the main half, away from the staged content the user was working through. - Unstaging the last staged hunk from the secondary half empties the staged side and collapses the split, hiding the secondary half — leaving focus stranded on a hidden pane. The rule is the same in both: focus the staged side while it survives. The stage handler now reports which focused-main pane should hold focus — the secondary half when unstaging leaves the file split, the main half otherwise — and the controller re-selects the revealed change in that pane and focuses it. The split is read from the model, which Refresh has already updated synchronously by the time the handler returns; the re-render it queues is what the reveal rides. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.go | ||
| common_commands.go | ||
| context.go | ||
| diff_line_info.go | ||
| keybindings.go | ||
| modes.go | ||
| ref_range.go | ||
| refresh.go | ||
| rendering.go | ||
| search_state.go | ||
| suggestion.go | ||
| version_number.go | ||
| version_number_test.go | ||
| views.go | ||