mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +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:
parent
280b4d60f8
commit
51fb82d6bf
45 changed files with 854 additions and 757 deletions
|
@ -27,11 +27,11 @@ type UndoController struct {
|
|||
var _ types.IController = &UndoController{}
|
||||
|
||||
func NewUndoController(
|
||||
common *ControllerCommon,
|
||||
c *ControllerCommon,
|
||||
) *UndoController {
|
||||
return &UndoController{
|
||||
baseController: baseController{},
|
||||
c: common,
|
||||
c: c,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue