Closed chelnak closed 1 year ago
This PR fixes a bug so that we will no longer encounter rendering issues when the application starts at the bottom of a terminal.
Two new commands have been added to the tput package:
Cuu
BufScreen
The manager now consumes the new tput commands so that we can always ensure that there is enough space to render our spinners.
Essentially before rendering starts we:
len(sm.spinners) * \n
len(sm.spinners)
This PR fixes a bug so that we will no longer encounter rendering issues when the application starts at the bottom of a terminal.
Two new commands have been added to the tput package:
Cuu
- moves the cursor up by n linesBufScreen
- print n * newline characters to the writer.The manager now consumes the new tput commands so that we can always ensure that there is enough space to render our spinners.
Essentially before rendering starts we:
len(sm.spinners) * \n
len(sm.spinners)