Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std: use SIGWINCH signal to update the size
SIGWINCH is a signal send to the process when the host terminal is resized, note that it's only available on Unix platforms. Catching this signal allows us to dynamically adapt the number of columns at a very low cost compared to `dynamic_ncols`. Indeed, as this approach is signal based, there is no need to poll the terminal size on each iteration.
- Loading branch information
1 parent
4c956c2
commit b8e0dc9
Showing
1 changed file
with
34 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters