aboutsummaryrefslogtreecommitdiffstats
path: root/termui
diff options
context:
space:
mode:
Diffstat (limited to 'termui')
-rw-r--r--termui/input_popup.go5
-rw-r--r--termui/show_bug.go17
2 files changed, 12 insertions, 10 deletions
diff --git a/termui/input_popup.go b/termui/input_popup.go
index c8299d2a..db0ec619 100644
--- a/termui/input_popup.go
+++ b/termui/input_popup.go
@@ -55,7 +55,10 @@ func (ip *inputPopup) layout(g *gocui.Gui) error {
v.Frame = true
v.Title = ip.title
v.Editable = true
- v.Write([]byte(ip.preload))
+ _, err = v.Write([]byte(ip.preload))
+ if err != nil {
+ return err
+ }
}
if _, err := g.SetCurrentView(inputPopupView); err != nil {
diff --git a/termui/show_bug.go b/termui/show_bug.go
index eb112674..d2e4fc09 100644
--- a/termui/show_bug.go
+++ b/termui/show_bug.go
@@ -422,7 +422,10 @@ func (sb *showBug) saveAndBack(g *gocui.Gui, v *gocui.View) error {
if err != nil {
return err
}
- ui.activateWindow(ui.bugTable)
+ err = ui.activateWindow(ui.bugTable)
+ if err != nil {
+ return err
+ }
return nil
}
@@ -468,8 +471,6 @@ func (sb *showBug) scrollDown(g *gocui.Gui, v *gocui.View) error {
}
func (sb *showBug) selectPrevious(g *gocui.Gui, v *gocui.View) error {
- defer sb.focusView(g)
-
var selectable []string
if sb.isOnSide {
selectable = sb.sideSelectableView
@@ -485,7 +486,7 @@ func (sb *showBug) selectPrevious(g *gocui.Gui, v *gocui.View) error {
}
sb.selected = selectable[maxInt(i-1, 0)]
- return nil
+ return sb.focusView(g)
}
}
@@ -493,12 +494,10 @@ func (sb *showBug) selectPrevious(g *gocui.Gui, v *gocui.View) error {
sb.selected = selectable[0]
}
- return nil
+ return sb.focusView(g)
}
func (sb *showBug) selectNext(g *gocui.Gui, v *gocui.View) error {
- defer sb.focusView(g)
-
var selectable []string
if sb.isOnSide {
selectable = sb.sideSelectableView
@@ -509,7 +508,7 @@ func (sb *showBug) selectNext(g *gocui.Gui, v *gocui.View) error {
for i, name := range selectable {
if name == sb.selected {
sb.selected = selectable[minInt(i+1, len(selectable)-1)]
- return nil
+ return sb.focusView(g)
}
}
@@ -517,7 +516,7 @@ func (sb *showBug) selectNext(g *gocui.Gui, v *gocui.View) error {
sb.selected = selectable[0]
}
- return nil
+ return sb.focusView(g)
}
func (sb *showBug) left(g *gocui.Gui, v *gocui.View) error {