aboutsummaryrefslogtreecommitdiffstats
path: root/termui
diff options
context:
space:
mode:
Diffstat (limited to 'termui')
-rw-r--r--termui/termui.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/termui/termui.go b/termui/termui.go
index a2a1a835..9894dfb2 100644
--- a/termui/termui.go
+++ b/termui/termui.go
@@ -179,19 +179,22 @@ func newBugWithEditor(repo cache.RepoCacher) error {
var b cache.BugCacher
if err == input.ErrEmptyTitle {
ui.msgPopup.Activate(msgPopupErrorTitle, "Empty title, aborting.")
+ initGui(nil)
+
+ return errTerminateMainloop
} else {
b, err = repo.NewBug(title, message)
if err != nil {
return err
}
- }
- initGui(func(ui *termUI) error {
- ui.showBug.SetBug(b)
- return ui.activateWindow(ui.showBug)
- })
+ initGui(func(ui *termUI) error {
+ ui.showBug.SetBug(b)
+ return ui.activateWindow(ui.showBug)
+ })
- return errTerminateMainloop
+ return errTerminateMainloop
+ }
}
func addCommentWithEditor(bug cache.BugCacher) error {