From 92aebe484f0162f792ffa7bb38c04796ba5d9007 Mon Sep 17 00:00:00 2001 From: Andrew Alexander Date: Fri, 26 Jan 2018 14:47:26 -0500 Subject: [PATCH] Add defer to termbox.Close() In a tmux window, when play exits, it leaves the terminal in an odd state where newlines aren't registering correctly. Simply adding the defer so that termbox cleanly exits seems to have fixed it for me. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 47293a1..de3298a 100644 --- a/main.go +++ b/main.go @@ -52,7 +52,7 @@ func main() { }() <-done - termbox.Close() + defer termbox.Close() io.Copy(os.Stdout, r) }