X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8894A384C007
Authentication-Results: sourceware.org;
 dmarc=none (p=none dis=none) header.from=towo.net
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo@towo.net
Subject: Re: Mintty text glitches when using up key
To: cygwin@cygwin.com
References: <DB7PR02MB3996E72ECDDB5C0A9F2F8D3AE7550@DB7PR02MB3996.eurprd02.prod.outlook.com>
 <c064a9ce-ec21-ff87-29a2-c9f6a510b773@SystematicSw.ab.ca>
From: Thomas Wolff <towo@towo.net>
X-Tagtoolbar-Keys: D20200828103345764
Message-ID: <4214ab62-9f2c-0c9d-26f1-5fff8ec2c376@towo.net>
Date: Fri, 28 Aug 2020 10:33:45 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
 Thunderbird/68.12.0
MIME-Version: 1.0
In-Reply-To: <c064a9ce-ec21-ff87-29a2-c9f6a510b773@SystematicSw.ab.ca>
X-Provags-ID: V03:K1:Hqks5zqtM5vus2qr9KqwtaUCGlY9sqNcn5DFGxwu/LBnT4EgSTD
 ONtSwXaR/ECUZfsY/igC1TA3xE9R7saunwcmMkfxP5AfE2UJ0mcct2uoELs1Xtt2sKOzy4L
 DEu+sTmkXC2kT9iq5/8uSB0SQMH31dSqEc/U8lrEMis/V9XRHEmSuR9IQYhvHodSCOMnarh
 841bVDlz8SR3vEgcTF2rg==
X-UI-Out-Filterresults: notjunk:1;V03:K0:3viGWlj4yeQ=:sZ2V8iMRGhiO/OhSUzLfit
 2Y6COid7DFuLdRTAN19rF2yWAS2EW99N80wx5nTeHpktxlp5TYsVHLEU92XZOqzdJ0+zOwu5z
 YiaStvaQESqW820sNMXsM6mIQSa+2iBsZksbTf/4csCpmig7LPt3LqAdEG9Vpli4sY1H4fx1+
 EBh7nZ26gkqXxqVIvejSnpVcEPGWpDu5+Yz1DF1w+lh/smaPeSnwlJsdt1VWrEnlbqJZttdYY
 9oDVYet3euNHBnhj0IivN3qYP/3VYbaBzEBP2zfzsKlbPjgxtlzJVqOg5aisbqk6FDTCsPhHn
 kbBYyMCCMPs7+eIETwxNbhm9FB50+xUVDXAKUWxlC9BYReLHBckGbNFIMcBb/VgxVDnJMN5NF
 Vcajjbc/3O7R0qT1keVqa3SOjRJUt+SManiVIY7An4DkJ0k8UCJsTo0ZR/CF/dFiQDmThTuAn
 nyndSnMV9DTiGnyCGiovL2bqnmg3WbKpKdIeONJP+xz3AI+kGrYMVPPA6byBIzMO+fPxJp0Cy
 b9xYsPpt7E3oILGMTz8QWMMRbDahTOrAm6wR/EVkgibU26R8bu++j2XGtsfyocCBcoiSfXW8X
 hNUKEhPrK7ed89blsH1lMAPllXiAc0lEb5x03jmyynSZIgoKcINqOFdVcrAjW8nXuhLAbY4xr
 QWHLNyi98Cs6rU9uphBD0A0sQOZSvIFNt0scNJ9SfnDJj35D3CMFDQSssSJu/tGxwFmNF2ykD
 igrPyuR+aehUpQQw7SQpauHKuqPjVXXpMMdkdBHKHCLuvHPs1P50Ibj/8N/9RVwGZ+AoVbBkD
 PZu8h8HVnUxg9Y01tZqoOHxDBGdLEeRGlbSmwMskSzh7A3TVKNh6NLhJsxEQxqJaKJbXvDo
X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,
 SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

Am 27.08.2020 um 21:55 schrieb Brian Inglis:
> On 2020-08-27 10:55, Hamish McIntyre-Bhatty via Cygwin wrote:
>> For a while I've noticed that if I run a long command (usually has to
>> wrap to next line down), that my Mintty session often becomes all messed
>> up if I use the up arrow keys to try and run it again later. Has anyone
>> else experienced this?
This description is quite fuzzy. It could be that you resized the window 
while a program was running, or that some background process sends 
output to the screen asynchronously. In such cases, the shell loses 
track of the cursor position and line editing fails. That's not a 
terminal issue.

>> Another, probably unrelated, observation is that if a command produces a
>> lot of long lines that get wrapped, if I make the Mintty window wider,
>> the lines stay wrapped. This behaves much like other terminal emulators
>> I used in the past, including gnome-terminal. At some point, this was
>> fixed in gnome-terminal, so I wonder if that fix would be relevant here too.
This was requested to mintty already 
(https://github.com/mintty/mintty/issues/82) but it's not a traditional 
terminal feature, so if some terminals have added it as an enhancement, 
that's not a "fix".
Thomas

>>
>> Unfortunately I know precious little about how terminal emulation works
>> so I'm not likely to be able to provide a fix, but I'm interested to see
>> if anyone else has experienced this or has found workarounds. It seems
>> to happen with both 32-bit and 64-bit Cygwin for me.
> Not a problem with long lines - often find myself editing a few lines down in a
> few hundred characters long after some iterations - I type without thought:
>
> 	$ history | tail > ~/bin/script
> 	$ vim + !$
>
> Problem is when you type ahead too fast, hit modifier keys and/or special
> functions by mistake in the wrong place, and/or when something else is running
> in the background, or the system is loaded, and mintty does not grab the whole
> escape sequence to process; often just running reset will restore sanity.
>
> [For real fun with mintty, type: $ echo `/usr/bin/env /usr/bin/python`
> You can kill python from another terminal window or TaskMgr.]
>

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