handle resize events properly

This commit is contained in:
Gokcehan committed 2018-04-15 18:18:39 +03:00
1 parent ad4fc51805
commit d608eb4a56
5 files changed
+12 -16

No files matched your search

+3 -4
View File
@@ -18,10 +18,7 @@ import (
"github.com/nsf/termbox-go"
)
const (
gEscapeCode = 27
gAnsiColorResetMask = termbox.AttrBold | termbox.AttrUnderline | termbox.AttrReverse
)
const gEscapeCode = 27
var gAnsiCodes = map[int]termbox.Attribute{
0: termbox.ColorDefault,
@@ -433,7 +430,9 @@ func (ui *ui) renew() {
wacc += widths[i]
}
ui.promptWin.renew(wtot, 1, 0, 0)
ui.msgWin.renew(wtot, 1, 0, htot-1)
ui.menuWin.renew(wtot, 1, 0, htot-2)
}
func (ui *ui) print(msg string) {