mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-29 15:09:22 +03:00
Don't append "Disabled: " to menu tooltip if disabled reason is empty
In some cases we set a disabled reason but leave the text empty, so that we don't get an error toast when the item is invoked. In such a case it looks awkward if there is a tooltip showing "Disabled: " with no following text.
This commit is contained in:
@@ -348,7 +348,7 @@ func (self *ConfirmationHelper) IsPopupPanelFocused() bool {
|
||||
|
||||
func (self *ConfirmationHelper) TooltipForMenuItem(menuItem *types.MenuItem) string {
|
||||
tooltip := menuItem.Tooltip
|
||||
if menuItem.DisabledReason != nil {
|
||||
if menuItem.DisabledReason != nil && menuItem.DisabledReason.Text != "" {
|
||||
if tooltip != "" {
|
||||
tooltip += "\n\n"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user