summaryrefslogtreecommitdiffstats
path: root/pkg/gui/tags_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-19 21:51:50 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit419cb9feb84d98633e5a5b15776b4956c5068a58 (patch)
tree4429228ed5a27587fdcc879c301065f679249002 /pkg/gui/tags_panel.go
parentdbf6bb5f2792afc4adebc9087529de5ac433131c (diff)
more standardisation
Diffstat (limited to 'pkg/gui/tags_panel.go')
-rw-r--r--pkg/gui/tags_panel.go16
1 files changed, 4 insertions, 12 deletions
diff --git a/pkg/gui/tags_panel.go b/pkg/gui/tags_panel.go
index 2bb14b963..5ae5c5efe 100644
--- a/pkg/gui/tags_panel.go
+++ b/pkg/gui/tags_panel.go
@@ -3,7 +3,6 @@ package gui
import (
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands"
- "github.com/jesseduffield/lazygit/pkg/gui/presentation"
)
// list panel functions
@@ -56,16 +55,6 @@ func (gui *Gui) refreshTags() error {
return gui.postRefreshUpdate(gui.Contexts.Tags.Context)
}
-func (gui *Gui) renderTagsContext() error {
- branchesView := gui.getBranchesView()
-
- gui.refreshSelectedLine(&gui.State.Panels.Tags.SelectedLine, len(gui.State.Tags))
- displayStrings := presentation.GetTagListDisplayStrings(gui.State.Tags, gui.State.Diff.Ref)
- gui.renderDisplayStrings(branchesView, displayStrings)
-
- return nil
-}
-
func (gui *Gui) handleCheckoutTag(g *gocui.Gui, v *gocui.View) error {
tag := gui.getSelectedTag()
if tag == nil {
@@ -136,7 +125,10 @@ func (gui *Gui) handleCreateTag(g *gocui.Gui, v *gocui.View) error {
for i, tag := range gui.State.Tags {
if tag.Name == tagName {
gui.State.Panels.Tags.SelectedLine = i
- _ = gui.renderTagsContext()
+ if err := gui.Contexts.Tags.Context.HandleRender(); err != nil {
+ gui.Log.Error(err)
+ }
+
return
}
}