[PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.
Tue Oct 22 06:55:00 GMT 2019
On Oct 22 09:09, Takashi Yano wrote:
> On Mon, 21 Oct 2019 11:43:56 +0200
> Corinna Vinschen wrote:
> > So it seems cmd.exe is the only (or one of few) native CLI tools
> > actually trying to manipulate the screen buffer. And what it does is
> > not so much clearing the screen, but to align buffer line 1 with the top
> > of the screen, even if line 1 has been produced before cmd.exe started.
> What is done is not clearing the screen, but redrawing the screen
> based on the screen buffer. This is done not by cmd.exe but by pseudo
> console, I believe. The trigger for redrawing is not clear to me.
> You can see what is done by pseudo console by checking "typescript"
> generated by script.
> > I didn't look deeper into this yet, but the question coming to mind is,
> > what does GetConsoleScreenBufferInfo return right after starting
> > `env TERM=dumb script`, how does it look like right after running
> > `reg.exe' and before `cmd.exe', and how does it look after cmd.exe
> > changed it?
> I confirmed the dwSize has right screen size and dwCursorPosition
> is (0,0) just after creating pty even though the cursor position
> in real screen is not at top left.
> Clearing screen fixes this mismatch.
And calling SetConsoleCursorPosition instead does not?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the Cygwin-patches