mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +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:
@ -22,11 +22,11 @@ type StatusController struct {
|
||||
var _ types.IController = &StatusController{}
|
||||
|
||||
func NewStatusController(
|
||||
common *ControllerCommon,
|
||||
c *ControllerCommon,
|
||||
) *StatusController {
|
||||
return &StatusController{
|
||||
baseController: baseController{},
|
||||
c: common,
|
||||
c: c,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user