mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04: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:
parent
0c0c32aec4
commit
da7121fa87
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue