diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-21 21:17:09 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 41df63cdc4d799ce7d78ecb0b1ed96dea65f1739 (patch) | |
tree | f590c6ceba89d374a0d25d9fc1561c22a20b259f /pkg/gui/global_handlers.go | |
parent | 4080e9b501137543ea4234be285b51fe9b29cf6b (diff) |
show when building patch
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r-- | pkg/gui/global_handlers.go | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go index 41c4895ff..ee44a3c48 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -142,21 +142,18 @@ func (gui *Gui) handleInfoClick(g *gocui.Gui, v *gocui.View) error { width, _ := v.Size() // if we're in the normal context there will be a donate button here - // if we have ('reset') at the end then - if gui.inFilterMode() { - if width-cx <= len(gui.Tr.SLocalize("(reset)")) { + if width-cx <= len(gui.Tr.SLocalize("(reset)")) { + if gui.inFilterMode() { return gui.exitFilterMode() - } else { - return nil } - } - - if gui.inDiffMode() { - if width-cx <= len(gui.Tr.SLocalize("(reset)")) { + if gui.inDiffMode() { return gui.exitDiffMode() - } else { - return nil } + if gui.GitCommand.PatchManager.Active() { + return gui.handleResetPatch() + } + } else { + return nil } if cx <= len(gui.Tr.SLocalize("Donate"))+len(INFO_SECTION_PADDING) { |