Instead of waking up regularly WaitEventsTimeout, WaitEvents and
PostEmptyEvent are used to make the main loop purely event driven. The
rate of redraws due to terminal activity can be tweaked via the new
wakePeriod const.
This leads to some significant performance improvements: Aminal now consumes:
- no CPU when idle (previously ~2.7% on my laptop)
- ~8.5% CPU on my machine when running htop full screen on a large
monitor (previously ~18.5% on my laptop)
- scrolling large amounts of output is an order of magnitude faster
This change also incidentally fixes data races around the terminal
dirty flag (which is now gone).
* Correct handling of DeviceAttributes request
* added DECCOLM support
* added DECALN control sequence support
* added NEL support
* bug fix: Erase To Cursor should be inclusive
* added support for 'Origin Mode' (DECOM) -- top/bottom margins only
* vttest test 1 screen 3: margin tests fixes
* added support for intermediate controls inside CSI sequence
* added support for LNM (Line Feed/New Line Mode)
* removed obsolete 'intermediate' parameter
* window resize on programmatic CSI resize
* DECCOLM should clear screen on both set and reset
* bug fix in autowrap mode
* TestCursorMovement runs all test cases; screen template images updated
Signed-off-by: Max Risuhin <risuhin.max@gmail.com>
* bug fix: line mode messing with autowrap
* added ResetVerticalMargins() method
* IsAutoWrap(), IsNewLineMode()
* corrected DECALN
* fixed NEL to work in Line Feed mode
* tyding up: removed map of 1 element