aboutsummaryrefslogtreecommitdiffstats
path: root/termui/show_bug.go
diff options
context:
space:
mode:
authorLuke Adams <lukeclydeadams@gmail.com>2018-10-04 10:30:56 -0600
committerLuke Adams <lukeclydeadams@gmail.com>2018-10-04 10:30:56 -0600
commite47c07681c6ddb458028a553ec3cb306b2e97e37 (patch)
tree85b006e86bf180ed7d84fb7e02020f661948c7a2 /termui/show_bug.go
parentbc8e6754a72157a944d304904a9a9dcf45e109ce (diff)
downloadgit-bug-e47c07681c6ddb458028a553ec3cb306b2e97e37.tar.gz
Use operation hash for view name
This change allows the operation to be found given only the view name.
Diffstat (limited to 'termui/show_bug.go')
-rw-r--r--termui/show_bug.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/termui/show_bug.go b/termui/show_bug.go
index 4ca987bd..aa52c8a3 100644
--- a/termui/show_bug.go
+++ b/termui/show_bug.go
@@ -9,6 +9,7 @@ import (
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/util/colors"
"github.com/MichaelMure/git-bug/util/text"
+ "github.com/MichaelMure/git-bug/util/git"
"github.com/jroimartin/gocui"
)
@@ -240,8 +241,8 @@ func (sb *showBug) renderMain(g *gocui.Gui, mainView *gocui.View) error {
fmt.Fprint(v, bugHeader)
y0 += lines + 1
- for i, op := range snap.Timeline {
- viewName := fmt.Sprintf("op%d", i)
+ for _, op := range snap.Timeline {
+ viewName := op.Hash().String()
// TODO: me might skip the rendering of blocks that are outside of the view
// but to do that we need to rework how sb.mainSelectableView is maintained