mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
If a custom command's "context" field contains a context name that doesn't exist, lazygit panics when building the keybindings. This could happen either because of a typo, or because a context is removed or renamed in a later version. Prevent the panic by validating those names at config load time, and rejecting the config as invalid there, like we do for other config errors. The gui package owns the list, but can't be imported from here, so it is mirrored and a test over there ensures the copies stay in sync. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app_config.go | ||
| app_config_test.go | ||
| config_default_platform.go | ||
| config_linux.go | ||
| config_windows.go | ||
| diff_renderer_config_manager.go | ||
| diff_renderer_config_manager_test.go | ||
| dummies.go | ||
| editor_presets.go | ||
| editor_presets_test.go | ||
| github_pull_request_cache.go | ||
| github_pull_request_cache_test.go | ||
| keybinding.go | ||
| keybinding_test.go | ||
| keynames.go | ||
| keynames_test.go | ||
| side_panel.go | ||
| user_config.go | ||
| user_config_validation.go | ||
| user_config_validation_test.go | ||