On Sunday, September 17th Oliver was heard saying...
there in line 3948 it is. There is an optional parameter n which states how to clear the screen. If it's not present or 0 then it should clear to the end of the screen. For this a function call to ClrEos()s included,
Many CSI parameters are optional and have default values. CSI n J is one of them. if there is no value for n, 0 is used (ClrEos).
How terminals interprete some codes vary. Like CSI r ; c H can be abbreviated to CSI H to move the cursor to row 1, col 1. CSI 0 m can be abbreviated CSI m.
I wrote a VT100 complient terminal once and things like attribute reset on clear screen, or even if the cursor should move vary. (the cursor is not supposed to go to 1,1 on CSI 2 J btw, but because of ANSI.SYS, many do).
Best to be safe and send the kitchen sink to the client. If you are clearing a screen and don't want to move the cursor, perform either CSI 0 J CSI 1 J or CSI
s CSI 2 J CSI u. Take nothing for granted. ;)
cw
--- ENiGMA 1/2 v0.0.8-alpha (linux; x64; 6.11.3)
* Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)