From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27616 invoked by alias); 8 Feb 2020 22:41:27 -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 27604 invoked by uid 89); 8 Feb 2020 22:41:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*f:sk:h4eiWge, H*i:sk:h4eiWge, sends, H*i:sk:ffMnW6z X-HELO: conssluserg-06.nifty.com Received: from conssluserg-06.nifty.com (HELO conssluserg-06.nifty.com) (210.131.2.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 22:41:24 +0000 Received: from Express5800-S70 (ntsitm196171.sitm.nt.ngn.ppp.infoweb.ne.jp [125.0.207.171]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 018Mf4MO010966 for ; Sun, 9 Feb 2020 07:41:04 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 018Mf4MO010966 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1581201664; bh=0CVOMwdffBKvqaTDXEGWdi+0dNIEJz9iwd2ORKY+59s=; h=Date:From:To:Subject:In-Reply-To:References:From; b=QGGDTFmcCyrCS1Sg9Be/h12Hlw6axbxGxmlnmeguvG7yvgqWsmCWdcgvS0BH0Pp8A N6BEW9GrmMyVv3lm35ZMIllX2FIScKdlbvbktsFuvl2Ackp65e742M1fl3CY5bASBk 65dmML3PxFn4uWklBUkZTZ5mPPIh7QWskZdkxaou41IQb4kXgK6/IYfHhMTe4l6asn MZ1TrX69yRpPSSF1k1susKmEZeC5HAcFiMRCylUPO1NjWgyZhltOMe8+0KsEF9i9SB VE2eRFbwD8hya6av/z8KZih1UThd3PV/uJVCOfCAL97sOAKKX1iZe/LPKLojRgiVFd dzok0q+Wnx9Dg== Date: Sat, 08 Feb 2020 22:41:00 -0000 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: Cygwin-3.1.3: Terminal contents are overwritten by less graphical ones on the start of non-Cygwin programs Message-Id: <20200209074105.a75c917c8ea1e85305fc9e50@nifty.ne.jp> In-Reply-To: References: <20200208232500.8d938b55f031316e196a1e84@nifty.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00070.txt.bz2 On Sat, 8 Feb 2020 23:29:09 +0800 Koichi Murase wrote: > > The pseudo console has its own screen buffer behind, and redraws the > > screen based on the screen buffer at undetermined timing. > > I'm not sure if I correctly understand the situation, but does this > mean we cannot prevent the pseudo console from redrawing the screen > (i.e., sending some texts and escape sequences to the terminal > emulators) based on its background screen buffer? For that reason do > we need to keep the terminal contents of both the terminal emulator > and the background screen consistent with each other? I think you understand correctly. Due to the reason above, pty sends data written by slave to both native screen and pseudo console. However, the interpretation of escapce sequence does not match perfectly between the real native screen and pseudo console, therefore, screen is changed when redraw screen is triggered. > > > * The problem is not restricted in just clearing graphic styles of > > > characters. For GNU Screen I use Screen-specific terminal sequences > > > (snip) > > > > How can I reproduce this? > > For example, in GNU screen, > > [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ > $BASH_COMMAND\e\\\][\u@\h \j \W]\$ ' > [user@hostname 0 ~]$ > [user@hostname 0 ~]$ > [user@hostname 0 ~]$ > [user@hostname 0 ~]$ > [user@hostname 0 ~]$ > [user@hostname 0 ~]$ > [user@hostname 0 ~]$ > [user@hostname 0 ~]$ ./nocyg > > where ./nocyg is the program in the original mail. Then it turnes > into something like: > > [user@hostname 0 ~]$ PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h > \[\e[33m\]\w\[\e[[user > @hostname 0 ~]$ PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[ > [user@hostname 0 ~]$ PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[ > 0m\]\n\$ '[user@hostname 0 ~]$ > > [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j > \W]\$ '[user@hostname 0 ~]$ > [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j > \W]\$ '[user@hostname 0 ~]$ > [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j > \W]\$ '[user@hostname 0 ~]$ > [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j > \W]\$ '[user@hostname 0 ~]$ > [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j > \W]\$ '[user@hostname 0 ~]$ > [user@hostname 0 ~]$ PS1='\[\ek[\u@\h \j \w]$ $BASH_COMMAND\e\\\][\u@\h \j > \W]\$ '[user@hostname 0 ~]$ ./nocyg > [user@hostname 0 ~]$ Hmmm, this is terrible indeed... I hope there could be a solution. -- Takashi Yano -- 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