diff options
author | Michael Muré <batolettre@gmail.com> | 2019-04-11 13:24:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 13:24:03 +0200 |
commit | 4fac4abbcd357b9a8a99222af15a7c5fca9f5633 (patch) | |
tree | 1cb1e11f92ef7a0540cddd945ef42c7607e92fd7 | |
parent | 5db2ddcbe879c14aa683cf7b41f69639a9e3fd2c (diff) | |
parent | ff686e6d5b8cf65d321d9c3522a467ed51fdd80b (diff) | |
download | git-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.go | 4 |
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 |