From 6db7c48ba8b6b3de2f9b73305782f20253ca9cb4 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 25 May 2020 13:43:02 +0200 Subject: [PATCH] Use a buffered channel for signal.Notify --- commands_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands_unix.go b/commands_unix.go index 3297461..5dc56cb 100644 --- a/commands_unix.go +++ b/commands_unix.go @@ -15,7 +15,7 @@ import ( // this function. func OnResize(newMsgFunc func() Msg) Cmd { return func() Msg { - sig := make(chan os.Signal) + sig := make(chan os.Signal, 1) signal.Notify(sig, syscall.SIGWINCH) <-sig return newMsgFunc()