[PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Oct 22 13:40:00 GMT 2019
On Oct 22 18:24, Takashi Yano wrote:
> On Tue, 22 Oct 2019 10:02:42 +0200
> Corinna Vinschen wrote:
> > On Oct 22 16:23, Takashi Yano wrote:
> > > On Tue, 22 Oct 2019 08:55:06 +0200
> > > Corinna Vinschen wrote:
> > > > On Oct 22 09:09, Takashi Yano wrote:
> > > > > 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?
> > >
> > > For SetConsoleCursorPosition, it is necessary to know the cursor
> > > position of course. I cannot come up with any other way than
> > > using ANSI escape sequence "ESC[6n". Do you think this is
> > > feasible?
> >
> > Hmm, interesting point. I think that should be ok for a start.
> > assuming it works.
>
> Unfortunately, this does not work as expected. Please try
> attached patch. Cursor position is kept as expected, but the
> screen contents before opening pty are lost when cmd.exe is
> executed.
>
> However, this fixes cursor position problem of netsh and WMIC.
Am I doing something wrong? This code crashes mintty on my
installation. At start, a string of "6n6n6n6n..." appears and then
mintty exits.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20191022/64d28c2c/attachment.sig>
More information about the Cygwin-patches
mailing list