aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorludovicm67 <ludovicmuller1@gmail.com>2019-04-10 23:53:10 +0200
committerludovicm67 <ludovicmuller1@gmail.com>2019-04-10 23:53:10 +0200
commitff686e6d5b8cf65d321d9c3522a467ed51fdd80b (patch)
tree9105be78894b46600cad9618eb43cfadb1e31627
parent0e53d2555e9a6ddc707f6c59497f30e182116c80 (diff)
downloadgit-bug-ff686e6d5b8cf65d321d9c3522a467ed51fdd80b.tar.gz
termui: fix bug when trying to edit without selection
-rw-r--r--termui/show_bug.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/termui/show_bug.go b/termui/show_bug.go
index 733c801e..68a46a31 100644
--- a/termui/show_bug.go
+++ b/termui/show_bug.go
@@ -639,6 +639,10 @@ func (sb *showBug) edit(g *gocui.Gui, v *gocui.View) error {
return sb.editLabels(g, snap)
}
+ if sb.selected == "" {
+ return nil
+ }
+
op, err := snap.SearchTimelineItem(git.Hash(sb.selected))
if err != nil {
return err