- run the after() func after the event queue is emptied.
- close termdash before comparing the content of the fake terminal,
the background redraw() function could still race with the faketerm.Diff
function which isn't thread safe.
This can be a more viable option for some users as it is less resource
intensive. The user knows when the data in any of the widget changed and
thus can trigger a redraw. External events still redraw the terminal
immediately.
Done here:
- Added a controller for the manually triggered redraws.
- Added an example of using termdash with triggered redraw.
- Removing couple of races in the test by waiting for the event queue to
empty before comparing values and by moving the test of terminal resize
into the test that triggers redraws.