File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,9 @@ func (self *MenuContext) GetKeybindings(opts types.KeybindingsOpts) []*types.Bin
173
173
174
174
func (self * MenuContext ) OnMenuPress (selectedItem * types.MenuItem ) error {
175
175
if selectedItem != nil && selectedItem .DisabledReason != "" {
176
+ if self .c .RunningIntegrationTest () {
177
+ return self .c .ErrorMsg (selectedItem .DisabledReason )
178
+ }
176
179
self .c .ErrorToast (self .c .Tr .DisabledMenuItemPrefix + selectedItem .DisabledReason )
177
180
return nil
178
181
}
Original file line number Diff line number Diff line change @@ -416,6 +416,9 @@ func (gui *Gui) callKeybindingHandler(binding *types.Binding) error {
416
416
disabledReason = binding .GetDisabledReason ()
417
417
}
418
418
if disabledReason != "" {
419
+ if gui .c .RunningIntegrationTest () {
420
+ return gui .c .ErrorMsg (disabledReason )
421
+ }
419
422
gui .c .ErrorToast (gui .Tr .DisabledMenuItemPrefix + disabledReason )
420
423
return nil
421
424
}
You can’t perform that action at this time.
0 commit comments