From d30d5901e7db1f67180f2a19de79541b5f655dee Mon Sep 17 00:00:00 2001 From: gizak Date: Sat, 28 Mar 2015 12:58:23 -0400 Subject: [PATCH] Fix https://github.com/gizak/termui/issues/14 --- block.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/block.go b/block.go index 33e143b..e9ecbb8 100644 --- a/block.go +++ b/block.go @@ -58,6 +58,14 @@ func (d *Block) align() { d.innerX++ d.innerY++ } + + if d.innerHeight < 0 { + d.innerHeight = 0 + } + if d.innerWidth < 0 { + d.innerWidth = 0 + } + } // Buffer implements Bufferer interface.