mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Fix clicking outside of the commit description panel or suggestions panel
We forgot to handle the "suggestions" and "commitDescription" view names. Instead of listing all the names of views that can appear in popups though, let's use the context kind for this, which feels more robust. This is a change in behavior: previously, clicking outside of the search or filter prompt would close the prompt, now it no longer does (because search has a persistent popup kind, but it wasn't listed in the list of view names before).
This commit is contained in:
@ -454,12 +454,12 @@ func (self *ConfirmationHelper) ResizeCommitMessagePanels() {
|
||||
_, _ = self.c.GocuiGui().SetView(self.c.Views().CommitDescription.Name(), x0, y0+summaryViewHeight, x1, y1+summaryViewHeight, 0)
|
||||
}
|
||||
|
||||
func (self *ConfirmationHelper) IsPopupPanel(viewName string) bool {
|
||||
return viewName == "commitMessage" || viewName == "confirmation" || viewName == "menu"
|
||||
func (self *ConfirmationHelper) IsPopupPanel(context types.Context) bool {
|
||||
return context.GetKind() == types.PERSISTENT_POPUP || context.GetKind() == types.TEMPORARY_POPUP
|
||||
}
|
||||
|
||||
func (self *ConfirmationHelper) IsPopupPanelFocused() bool {
|
||||
return self.IsPopupPanel(self.c.CurrentContext().GetViewName())
|
||||
return self.IsPopupPanel(self.c.CurrentContext())
|
||||
}
|
||||
|
||||
func (self *ConfirmationHelper) TooltipForMenuItem(menuItem *types.MenuItem) string {
|
||||
|
Reference in New Issue
Block a user