diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 69765b8a5..01039e028 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -607,18 +607,8 @@ func (gui *Gui) createTagMenu(commitSha string) error { } func (gui *Gui) afterTagCreate(tagName string) error { - return gui.refreshSidePanels(refreshOptions{mode: ASYNC, scope: []RefreshableView{COMMITS, TAGS}, then: func() { - // find the index of the tag and set that as the currently selected line - for i, tag := range gui.State.Tags { - if tag.Name == tagName { - gui.State.Panels.Tags.SelectedLineIdx = i - if err := gui.State.Contexts.Tags.HandleRender(); err != nil { - gui.Log.Error(err) - } - return - } - } - }}) + gui.State.Panels.Tags.SelectedLineIdx = 0 // Set to the top + return gui.refreshSidePanels(refreshOptions{mode: ASYNC, scope: []RefreshableView{COMMITS, TAGS}}) } func (gui *Gui) handleCreateAnnotatedTag(commitSha string) error {