From 5cdfd41dca3ee2c080e8f3d40cfdc147e0b8a595 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 23 Aug 2020 11:13:51 +1000 Subject: [PATCH] prevent spamming pull or push buttons --- pkg/gui/files_panel.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 488b7f569..4f52cb86c 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -425,6 +425,10 @@ func (gui *Gui) refreshStateFiles() error { } func (gui *Gui) handlePullFiles(g *gocui.Gui, v *gocui.View) error { + if gui.popupPanelFocused() { + return nil + } + // if we have no upstream branch we need to set that first currentBranch := gui.currentBranch() if currentBranch.Pullables == "?" { @@ -526,6 +530,10 @@ func (gui *Gui) pushWithForceFlag(v *gocui.View, force bool, upstream string, ar } func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error { + if gui.popupPanelFocused() { + return nil + } + // if we have pullables we'll ask if the user wants to force push currentBranch := gui.currentBranch()