Open y9c opened 5 years ago
Just a quick tip but you can detect when the terminal is resized by listening for the "<Resized>"
event from the channel returned from PollEvents()
. Example here: https://github.com/gizak/termui/blob/213738dbc71cff7412f8dae6d9f27ce4c379dc38/_examples/grid.go#L95-L108
I need to make the ui autoadjustable. I use ui.TermWidth() to detect terminal width every second and resize it if terminal width is changed.