[PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.
Mon Nov 11 09:18:00 GMT 2019
On Nov 8 22:42, Takashi Yano wrote:
> Hi Corinna,
> On Fri, 8 Nov 2019 12:09:55 +0100
> Corinna Vinschen wrote:
> > On Oct 24 15:33, Corinna Vinschen wrote:
> > > On Oct 24 19:17, Takashi Yano wrote:
> > > > On Thu, 24 Oct 2019 11:38:17 +0200
> > > > Corinna Vinschen wrote:
> > > > > Well, what I see when starting cmd.exe with this patch is a short
> > > > > flicker in the existing output in mintty, but the cursor position
> > > > > stays the same. and cmd.exe output is where you'd expect it.
> > > >
> > > > I mean:
> > > > 1) start mintty
> > > > 2) ps
> > > > 3) script
> > > > 4) cmd
> > > >
> > > > In my environment, output of ps command disappears.
> > >
> > > In mine, too. This does not occur w/o running script.
> > Any news here? Why does this only occur with script? Is that something
> > about reusing (or not reusing) the existing pseudo console?
> This does not occur only with script. If you run
> ssh localhost
> instead of script in step 3), it also happens.
> This is because the console screen buffer is empty when pty
> (pseudo console) is started. By executing cmd.exe, screen
> is redrawn based on the console screen buffer. As a result,
> the screen contents which are not in the screen buffer is
> I came up with another alternative. How about the attached
> patch? This forcibly redraws screen when the first native
> program is executed after creating new pty (pseudo console),
> instead of clearing screen.
> This does not solve missing screen contents, but can avoid
> cursor position problem in netsh.
I tested it and I think this is a great step forward. Dropping
$TERM checks and clear screen sequence is the way to go!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the Cygwin-patches