diff options
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/keybindings.go | 8 | ||||
-rw-r--r-- | pkg/gui/tags_panel.go | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 0afd63a26..9f8263ba7 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -578,6 +578,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Description: gui.Tr.SLocalize("createTag"), }, { + ViewName: "branches", + Contexts: []string{"tags"}, + Key: gui.getKey("commits.viewResetOptions"), + Modifier: gocui.ModNone, + Handler: gui.handleCreateResetToTagMenu, + Description: gui.Tr.SLocalize("resetToThisTag"), + }, + { ViewName: "branches", Key: gui.getKey("universal.nextTab"), Modifier: gocui.ModNone, diff --git a/pkg/gui/tags_panel.go b/pkg/gui/tags_panel.go index 8b74a3527..0cd6d2859 100644 --- a/pkg/gui/tags_panel.go +++ b/pkg/gui/tags_panel.go @@ -140,3 +140,12 @@ func (gui *Gui) handleCreateTag(g *gocui.Gui, v *gocui.View) error { return gui.refreshTags() }) } + +func (gui *Gui) handleCreateResetToTagMenu(g *gocui.Gui, v *gocui.View) error { + tag := gui.getSelectedTag() + if tag == nil { + return nil + } + + return gui.createResetMenu(tag.Name) +} |