diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-12 02:42:03 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-12 02:42:03 +0200 |
commit | 53a3d5e11355ec6bed2e27bc26459a50e435b643 (patch) | |
tree | 36fc783081f21bed66398e3f93b6c0c1b6bd1275 /termui/error_popup.go | |
parent | f51cc4a33fcac3ebf2024e0c6cb97cb809f8db71 (diff) | |
download | git-bug-53a3d5e11355ec6bed2e27bc26459a50e435b643.tar.gz |
termui: add and remove labels
Diffstat (limited to 'termui/error_popup.go')
-rw-r--r-- | termui/error_popup.go | 5 |
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 } |