aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-04-11 13:24:03 +0200
committerGitHub <noreply@github.com>2019-04-11 13:24:03 +0200
commit4fac4abbcd357b9a8a99222af15a7c5fca9f5633 (patch)
tree1cb1e11f92ef7a0540cddd945ef42c7607e92fd7
parent5db2ddcbe879c14aa683cf7b41f69639a9e3fd2c (diff)
parentff686e6d5b8cf65d321d9c3522a467ed51fdd80b (diff)
downloadgit-bug-4fac4abbcd357b9a8a99222af15a7c5fca9f5633.tar.gz
Merge pull request #125 from ludovicm67/patch-edit-no-selection
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