summaryrefslogtreecommitdiff
path: root/tui/posix.go
blob: 6a3b859b9de500774099a0080fe8a9415fd8e281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//go:build !windows
package tui

import (
	"os"
	"os/signal"
	"syscall"
)

func detectSizeChange() {
	sigs := make(chan os.Signal, 1)
	signal.Notify(sigs, syscall.SIGWINCH)
	for _ = range sigs {
		sendEvent(Event {Resize: true})
	}
}