readline
readline copied to clipboard
panic when resize window in windows terminal
example code: https://github.com/reeflective/console/tree/main/example
env: windows 11, windows terminal
go run ./example
resize windows terminal
❯ go run .\example\
_____ __ _ _ _ _____ _
| __ \ / _| | | | (_) / ____| | |
| |__) |___ ___| |_| | ___ ___| |_ ___ _____ | | ___ _ __ ___ ___ | | ___
| _ // _ \/ _ \ _| |/ _ \/ __| __| \ \ / / _ \ | | / _ \| '_ \/ __|/ _ \| |/ _ \
| | \ \ __/ __/ | | | __/ (__| |_| |\ V / __/ | |___| (_) | | | \__ \ (_) | | __/
|_| \_\___|\___|_| |_|\___|\___|\__|_| \_/ \___| \_____\___/|_| |_|___/\___/|_|\___|
example [main] in console
> ffatal error: all goroutines are asleep - deadlock! 01:58:15.277
goroutine 1 [chan send (nil chan)]:
github.com/reeflective/readline/internal/core.(*Keys).readInputFiltered(0xc0000f4000)
D:/SDK/go/gopath/pkg/mod/github.com/reeflective/[email protected]/internal/core/keys_windows.go:84 +0x34
github.com/reeflective/readline/internal/core.WaitAvailableKeys(0xc0000f4000, 0x83095a?)
D:/SDK/go/gopath/pkg/mod/github.com/reeflective/[email protected]/internal/core/keys.go:70 +0x14f
github.com/reeflective/readline.(*Shell).Readline(0xc000037040)
D:/SDK/go/gopath/pkg/mod/github.com/reeflective/[email protected]/readline.go:89 +0x24e
github.com/reeflective/console.(*Console).StartContext(0xc0001a4000, {0x8b6738, 0xb7ca60})
D:/Programing/go/console/run.go:48 +0x1c6
github.com/reeflective/console.(*Console).Start(...)
D:/Programing/go/console/run.go:19
main.main()
D:/Programing/go/console/example/main.go:79 +0x189
exit status 2