This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.


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
lost.

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.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

Attachment: pty-redraw.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]