mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Fix calculation of tooltip height
For tooltips that are just one or two characters longer than the available width, the last word would be cut off. On my screen this happened for the tooltip for the fixup command.
This commit is contained in:
parent
f6ace8380f
commit
2d0c96466a
1 changed files with 2 additions and 1 deletions
|
@ -368,7 +368,8 @@ func (self *ConfirmationHelper) resizeMenu() {
|
|||
if selectedItem != nil {
|
||||
tooltip = self.TooltipForMenuItem(selectedItem)
|
||||
}
|
||||
tooltipHeight := getMessageHeight(true, tooltip, panelWidth) + 2 // plus 2 for the frame
|
||||
contentWidth := panelWidth - 2 // minus 2 for the frame
|
||||
tooltipHeight := getMessageHeight(true, tooltip, contentWidth) + 2 // plus 2 for the frame
|
||||
_, _ = self.c.GocuiGui().SetView(self.c.Views().Tooltip.Name(), x0, tooltipTop, x1, tooltipTop+tooltipHeight-1, 0)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue