generated from indoorvivants/scala3-library-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We can use signals (SIGWINCH) and two threads to handle resizing.
Here's a simple gist where I tested that it works: https://gist.github.com/keynmol/e5322a01c85edfa521fe5f6aebb2bef6
We will need to run the input provider on a separate thread.
We should add another group of events – Event.TerminalChange(size = WindowSize(width = ..., height = ...)), and add an optional WindowSize parameter to Event.Init, so that the prompt can optionally size itself accordingly to the window size.
This will involve some non-trivial logic in fitting the text on the screen horizontally, potentially splitting it in multiple lines (depends on #43)
Metadata
Metadata
Assignees
Labels
No labels