aboutsummaryrefslogtreecommitdiffstats
path: root/termui/error_popup.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-12 02:42:03 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-12 02:42:03 +0200
commit53a3d5e11355ec6bed2e27bc26459a50e435b643 (patch)
tree36fc783081f21bed66398e3f93b6c0c1b6bd1275 /termui/error_popup.go
parentf51cc4a33fcac3ebf2024e0c6cb97cb809f8db71 (diff)
downloadgit-bug-53a3d5e11355ec6bed2e27bc26459a50e435b643.tar.gz
termui: add and remove labels
Diffstat (limited to 'termui/error_popup.go')
-rw-r--r--termui/error_popup.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/termui/error_popup.go b/termui/error_popup.go
index 855bd05d..f8f53feb 100644
--- a/termui/error_popup.go
+++ b/termui/error_popup.go
@@ -2,6 +2,7 @@ package termui
import (
"fmt"
+
"github.com/MichaelMure/git-bug/util"
"github.com/jroimartin/gocui"
)
@@ -38,7 +39,7 @@ func (ep *errorPopup) layout(g *gocui.Gui) error {
width := minInt(30, maxX)
wrapped, nblines := util.WordWrap(ep.message, width-2)
- height := minInt(nblines+2, maxY)
+ height := minInt(nblines+1, maxY)
x0 := (maxX - width) / 2
y0 := (maxY - height) / 2
@@ -66,6 +67,6 @@ func (ep *errorPopup) close(g *gocui.Gui, v *gocui.View) error {
return g.DeleteView(errorPopupView)
}
-func (ep *errorPopup) activate(message string) {
+func (ep *errorPopup) Activate(message string) {
ep.message = message
}