mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-27 22:38:09 +02:00
Use ErrorToast instead of error panel when invoking a disabled command
This commit is contained in:
@@ -173,7 +173,8 @@ func (self *MenuContext) GetKeybindings(opts types.KeybindingsOpts) []*types.Bin
|
||||
|
||||
func (self *MenuContext) OnMenuPress(selectedItem *types.MenuItem) error {
|
||||
if selectedItem != nil && selectedItem.DisabledReason != "" {
|
||||
return self.c.ErrorMsg(selectedItem.DisabledReason)
|
||||
self.c.ErrorToast(self.c.Tr.DisabledMenuItemPrefix + selectedItem.DisabledReason)
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := self.c.PopContext(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user