From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84515 invoked by alias); 11 Apr 2019 17:24:54 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 84279 invoked by uid 89); 11 Apr 2019 17:24:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1876, 11.04.2019, 11042019, screens X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.135) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Apr 2019 17:24:21 +0000 Received: from [192.168.178.45] ([95.91.209.162]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M9FSx-1hH6HM0J7P-006Lla for ; Thu, 11 Apr 2019 19:24:19 +0200 Subject: Re: *cause of* screen writing over restored buffer on detach/exit To: cygwin@cygwin.com References: <56fced2e-4f98-7bba-136b-5eeded34ce6f@shaddybaddah.name> <6cc3bc5e-2c3c-61a1-8473-8c531faceac7@shaddybaddah.name> <990saedodb302s3fr7me8j2befc9pdam97@4ax.com> From: Thomas Wolff Message-ID: Date: Thu, 11 Apr 2019 17:24:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00090.txt.bz2 Am 11.04.2019 um 14:12 schrieb Andrew Schulman: >> Am 10.04.2019 um 17:04 schrieb Andrew Schulman: >>> Hi Shaddy. There you go again. >>> >>>> The reason seems to be that the Debian screen package packages a custom >>>> /etc/screenrc that does not include this explicit term capability: >>>> >>>> >>>> # >>>> # Do not use xterms alternate window buffer. >>>> # This one would not add lines to the scrollback buffer. >>>> termcap xterm|xterms|xs ti=\E7\E[?47l >>>> terminfo xterm|xterms|xs ti=\E7\E[?47l >>>> >>>> >>>> If I comment these out, my screen issue is resolved. >>> I don't know whose fault the problem is either, but it's probably a >>> particularity of Cygwin. So I'm happy to package the fix as long as it >>> doesn't create any problems. >> screen sends CSI ? 1049l on exit which restores the cursor to the >> position where it was previously saved. >> It's the "te" (not ti) terminfo sequence for xterm on cygwin. > Thomas, can you please clarify: Are you suggesting changing ti to te in the above entries? I was just reporting what I had discovered. The above settings do not seem to make sense, though, as they would restore the cursor (to what?) when screen is started. On the other hand, screen behaviour when the settings are disabled do not make much sense, either. It sends a Restore Cursor sequence without having sent a Save Cursor before. Very weird. > Or do you have another suggested patch? Any change I tried seems to make screen exit behaviour better, sometimes leaving at the bottom, sometimes at the top (after clearing the screen). > > Although I'm the screen maintainer, I've never learned the intricacies of termcapinfo. The screen manual is a bit fuzzy about this. Apparently you can tweak screen's assumptions about your terminal. But normally you shouldn't need to. Thomas -- 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