summaryrefslogtreecommitdiff
path: root/draw.go
diff options
context:
space:
mode:
Diffstat (limited to 'draw.go')
-rw-r--r--draw.go46
1 files changed, 12 insertions, 34 deletions
diff --git a/draw.go b/draw.go
index 8a89255..c1094c2 100644
--- a/draw.go
+++ b/draw.go
@@ -77,42 +77,20 @@ func (rs *RepoStatus) drawGitBranches() {
}
})
+ rs.TagsW = rs.TagWindow()
+
newgrid.NewButton("Show tags", func() {
- tw := rs.TagWindow()
- tw.Prune()
- // git tag --list --sort=taggerdate
- // git for-each-ref --sort=taggerdate --format '%(tag) %(*objectname) %(taggerdate)'
- // git rev-parse HEAD
- // if last tag == HEAD, then remove it
+ if rs.TagsW == nil {
+ log.Warn("error: found rs.TagsW == nil")
+ rs.TagsW = rs.TagWindow()
+ return
+ }
+ if rs.TagsW.Hidden() {
+ rs.TagsW.Show()
+ } else {
+ rs.TagsW.Show()
+ }
})
-
- /*
- newgrid.NewButton("CheckSafeGoSumRemake()", func() {
- if ok, bad := rs.CheckSafeGoSumRemake(); ok {
- log.Log(WARN, "CheckSafeGoSumRemake() is safe to redo")
- } else {
- log.Log(WARN, "CheckSafeGoSumRemake() is not safe. problems:", bad)
- }
- })
-
- newgrid.NewButton("CheckGoSum()", func() {
- if ok, missing := rs.CheckGoSum(); ok {
- log.Log(WARN, "CheckGoSum() is ok")
- } else {
- log.Log(WARN, "CheckGoSum() is not ok. missing:", missing)
- }
- })
- newgrid.NewButton("CheckPrimativeGoMod()", func() {
- if rs.CheckPrimativeGoMod() {
- log.Log(WARN, "is primative")
- } else {
- log.Log(WARN, "is not primative")
- }
- })
- newgrid.NewButton("MakeRedomod()", func() {
- rs.MakeRedomod()
- })
- */
}
func (rs *RepoStatus) drawGitStatus() {