mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 11:09:17 -07:00
Use a buffered channel for OS signals
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
// Argument output should be the file descriptor for the terminal; usually
|
||||
// os.Stdout.
|
||||
func listenForResize(output *os.File, msgs chan Msg, errs chan error) {
|
||||
sig := make(chan os.Signal)
|
||||
sig := make(chan os.Signal, 1)
|
||||
signal.Notify(sig, syscall.SIGWINCH)
|
||||
for {
|
||||
<-sig
|
||||
|
||||
Reference in New Issue
Block a user