From 66695e069be35a28ec2bb620a3ba602beb54b515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Kapri=C5=A1?= Date: Sat, 28 Aug 2021 09:39:28 +0200 Subject: [PATCH] Enable screen resizing --- Main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Main.go b/Main.go index a4e8a44..9a60fc8 100644 --- a/Main.go +++ b/Main.go @@ -117,6 +117,7 @@ func drawMonth(m time.Month, x, y int) { } func drawWall() { + wall.Clear() w, h := wall.Size() if w < monthWidth + 2 * smallGap || h < monthHeight + 2 * smallGap + titleHeight { wrappedText("Екран је премали за календар.", wall, defStyle) @@ -174,6 +175,7 @@ func main() { // Process event switch ev := ev.(type) { case *tcell.EventResize: + drawWall() wall.Sync() case *tcell.EventKey: if ev.Key() == tcell.KeyEscape || ev.Key() == tcell.KeyCtrlC ||