diff options
author | ludovicm67 <ludovicmuller1@gmail.com> | 2019-04-10 23:53:10 +0200 |
---|---|---|
committer | ludovicm67 <ludovicmuller1@gmail.com> | 2019-04-10 23:53:10 +0200 |
commit | ff686e6d5b8cf65d321d9c3522a467ed51fdd80b (patch) | |
tree | 9105be78894b46600cad9618eb43cfadb1e31627 | |
parent | 0e53d2555e9a6ddc707f6c59497f30e182116c80 (diff) | |
download | git-bug-ff686e6d5b8cf65d321d9c3522a467ed51fdd80b.tar.gz |
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 |