X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding; q=dns; s=
	default; b=NzqEcATCmmHQQsN9o712z0p5NsHBiNjfo4Kv0On2nviJsCdVOUs3Z
	x2XlgcekSGtW8EpzybOq9MyQbjAI/ORtx6rCVuf8cmwdohFNwdr4i9no9A6u4jeB
	OH/DvMFGEG0nVgk1ghFxL0msWK5zOWCme00/QJgjV3Tvd19qwuFk5s=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding; s=default;
	 bh=xrV6YgH7rpAKV4WhM7HDa8Ua/mE=; b=pQ1/ESCN3H+HYifPsx5geIN/4XFE
	CXVZ0RUtz7/7442PC5j5mCqQFieqsyhVc8O4WcYDbeofmUQ49NeTniQZEn8SCM9A
	sM3uKR6HrnzIuoKG4vUAE05z67CQs/BRmAmFdQMHaZXLxPpdOr6l9nif+UWY8HX6
	RoGapfc5YCmKdcA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin@cygwin.com
From: Andrew Schulman <schulman.andrew@epa.gov>
Subject: Re: screen on 64-bit mangles mintty/buffer
Date: Mon, 12 May 2014 12:46:26 -0400
Lines: 64
Message-ID: <90t1n9l4g51dgrq060rc6ua48eog4178v8@4ax.com>
References: <5370E144.4010905@shaddybaddah.name>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Archive: encrypt
X-IsSubscribed: yes

Hi Shaddy.

> Hi,
> 
> This is a problem that I noticed some time last year, so I apologise for
> sitting on it for so long. I actually started drafting a number of
> emails to report but never committed.
> 
> The problem only occurs with screen on 64-bit Cygwin. The 32-bit appears
> to work correctly. The problem is that when screen is run in mintty, it
> seems to exclude the bottom line, reducing the actual size of the
> buffer. Further, something goes awry at the top. So that if you run
> emacs -nw or less from within, scrolling via the keys acts very
> strangely.
> 
> If you detach or simply exit the screen session, the problem carries on
> on the mintty you are left with.
> 
> You can resolve this by resizing the window (and back). Everything then
> returns to normal.
> 
> It is interesting to me that the problem also occurs if I ssh into the
> 64-bit Cygwin install via Putty. However, the problem only occurs from
> within the screen session. When you detach or exit, the original Putty
> session/buffer is uncorrupted.

OK.  This sounds like the same problem as:  

http://cygwin.com/ml/cygwin/2014-01/msg00223.html

Actually that report is sort of the opposite problem:  all of the
scrolling is down in the bottom line.  But it sure sounds like the same
thing.

The details of what people report vary.  For me, scrolling ends up all
down in the bottom line, and resizing the window doesn't fix it.

I also see the problem only in 64-bit.  It works fine in 32-bit.

I have found one reliable workaround, at least for me:  The problem only
happens if I start screen from my .bash_profile.  If I start it from the
command line, it works fine.  I don't know yet why that is, but it's a
clue.  Probably an environment difference.

Are you using the latest screen release, 4.2.1?  Please send output of
cygcheck -svr.

> My foolishness in not reporting this as soon as I detected it is that
> my attempts to bisect/rollback to a period where my recollection
> suggests the problem did not exist, have not succeeded. In other words,
> my tests indicate this has been around since screen was built and
> released for 64-bit Cygwin.
> 
> I was hoping to understand the terminal handling and suggest a fix, but
> it is a little bit beyond my capability at the moment. Any help would
> be appreciated (I usually quarantine one mintty which I use for managing
> a handful of screen sessions to work around the problem).

No problem, thanks for reporting.  Corinna suggests that it's a mintty
problem.  Is that more likely than a screen problem?  I don't know.  If
it is a screen problem, I don't have the skills to offer a fix - all I
can do is report it to the screen-users list.

Andrew


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

