From eccaea01260aaf5aba73106ca4b707a3ed890411 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 6 Oct 2015 01:07:11 -0700 Subject: [PATCH] fixes #30 Resize needs to invalidate cells fixes #29 ErrorEvent needs to implement error --- errors.go | 4 ++++ tscreen.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/errors.go b/errors.go index bd81088..c4a9ad7 100644 --- a/errors.go +++ b/errors.go @@ -33,6 +33,10 @@ func (ev *EventError) When() time.Time { return ev.t } +func (ev *EventError) Error() string { + return ev.err.Error() +} + func NewEventError(err error) *EventError { return &EventError{t: time.Now(), err: err} } diff --git a/tscreen.go b/tscreen.go index 95cb1b5..9695a47 100644 --- a/tscreen.go +++ b/tscreen.go @@ -558,6 +558,8 @@ func (t *tScreen) resize() { t.cells = ResizeCells(t.cells, t.w, t.h, w, h) t.w = w t.h = h + + InvalidateCells(t.cells) } } if ev != nil {