diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-19 08:45:21 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-19 21:42:21 +1100 |
commit | 8fbcc36331cb5ac7a61493ff185782d6233d4673 (patch) | |
tree | 5bd48d9cf71b46dfc1676054aaa6b8df1e5748e0 /pkg/gui | |
parent | dadb6462523a545bb5256d7a3c08ffb341f980cc (diff) |
allow resetting cherry picked commits selection
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/commits_panel.go | 5 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 8baa5c9e5..a5e864dc9 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -642,3 +642,8 @@ func (gui *Gui) handleOpenSearchForCommitsPanel(g *gocui.Gui, v *gocui.View) err return gui.handleOpenSearch(gui.g, v) } + +func (gui *Gui) handleResetCherryPick(g *gocui.Gui, v *gocui.View) error { + gui.State.CherryPickedCommits = []*commands.Commit{} + return gui.refreshCommits(gui.g) +} diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 3f965f2f6..501f1faea 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -842,6 +842,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { }, { ViewName: "commits", + Contexts: []string{"branch-commits"}, + Key: gui.getKey("commits.resetCherryPick"), + Modifier: gocui.ModNone, + Handler: gui.handleResetCherryPick, + Description: gui.Tr.SLocalize("resetCherryPick"), + }, + { + ViewName: "commits", Contexts: []string{"reflog-commits"}, Key: gui.getKey("universal.select"), Modifier: gocui.ModNone, |