mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 16:16:28 -04:00
The focused main view now plays the role the staging panel used to, so the working-tree commands the staging panel offered — commit (and its variants) and find-base-commit-for-fixup — need to be reachable there as well. Gate them to when the focused main view actually shows the working-tree diff (DiffMainViewTypeStaging), which is exactly the role the staging panel filled. Over a commit's or stash's diff these commands would operate on the working tree, unrelated to what's on screen, so the keys are a no-op there and the bindings don't clutter its keybinding menu. The gate is re-checked on each press rather than captured at registration time, since one keybinding set serves the main view over every panel. That requires reading the panel beneath the main view from GetKeybindings (to decide whether to show the descriptions), which runs for off-stack contexts too — at startup and during cheatsheet generation — so a panic-safe IsInStack guards the NextInStack lookup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||