mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 16:16:28 -04:00
Until now space toggled lines into a custom patch only from the commit files main view (the per-file diff). Register the same toggle handler on the commits, sub-commits and stash panels, so a patch can be built straight from the whole-commit (multi-file) diff their main view shows, without first diving into the commit files panel. The handler lives on SwitchToDiffFilesController, which is already bound to exactly those three panels and already knows how to derive the patch target (from/to/reverse/canRebase) for the selected ref — pulled out of enter() into a shared canRebase helper and the reused FromAndToForDiff. The post-toggle refresh is the cheap one: these panels have no per-file patch indicator to update, so we just re-render their own main + secondary views rather than reloading the whole commit list on every keystroke. Sub-commits and stash didn't render the secondary patch view at all; give them the same secondaryPatchPanelUpdateOpts the commits panel uses, and recompute the inclusion gutter as their diff (re-)renders, so the cumulative patch and the gutter track the toggle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bisect | ||
| branch | ||
| cherry_pick | ||
| commit | ||
| config | ||
| conflicts | ||
| custom_commands | ||
| demo | ||
| diff | ||
| file | ||
| filter_and_search | ||
| filter_by_author | ||
| filter_by_path | ||
| interactive_rebase | ||
| misc | ||
| patch_building | ||
| reflog | ||
| remote | ||
| shared | ||
| shell_commands | ||
| staging | ||
| stash | ||
| status | ||
| submodule | ||
| sync | ||
| tag | ||
| ui | ||
| undo | ||
| worktree | ||
| test_list.go | ||
| test_list_generator.go | ||
| tests.go | ||