mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-29 00:51:35 +02:00
Enforce single-item selection in various actions
We want to show an error when the user tries to invoke an action that expects only a single item to be selected. We're using the GetDisabledReason field to enforce this (as well as DisabledReason on menu items). I've created a ListControllerTrait to store some shared convenience functions for this.
This commit is contained in:
pkg
gui
context
traits
controllers
basic_commits_controller.gobisect_controller.gobranches_controller.gocommand_log_controller.gocommit_description_controller.gocommit_message_controller.gocommits_files_controller.goconfirmation_controller.gocontext_lines_controller.gocustom_patch_options_menu_action.gofiles_controller.gofiles_remove_controller.gogit_flow_controller.goglobal_controller.gojump_to_side_window_controller.golist_controller_trait.golocal_commits_controller.gomenu_controller.gomerge_conflicts_controller.gopatch_building_controller.goreflog_commits_controller.goremote_branches_controller.goremotes_controller.gosearch_prompt_controller.goside_window_controller.gosnake_controller.gostaging_controller.gostash_controller.gostatus_controller.gosub_commits_controller.gosubmodules_controller.gosuggestions_controller.goswitch_to_diff_files_controller.goswitch_to_sub_commits_controller.gotags_controller.goundo_controller.goworktree_options_controller.goworktrees_controller.go
global_handlers.gokeybindings.gotypes
i18n
integration
tests
@ -13,11 +13,11 @@ type CommitDescriptionController struct {
|
||||
var _ types.IController = &CommitMessageController{}
|
||||
|
||||
func NewCommitDescriptionController(
|
||||
common *ControllerCommon,
|
||||
c *ControllerCommon,
|
||||
) *CommitDescriptionController {
|
||||
return &CommitDescriptionController{
|
||||
baseController: baseController{},
|
||||
c: common,
|
||||
c: c,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user