public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Mintty text glitches when using up key
@ 2020-08-27 16:55 Hamish McIntyre-Bhatty
  2020-08-27 19:55 ` Brian Inglis
  0 siblings, 1 reply; 8+ messages in thread
From: Hamish McIntyre-Bhatty @ 2020-08-27 16:55 UTC (permalink / raw)
  To: Cygwin General Mailing List


[-- Attachment #1.1.1: Type: text/plain, Size: 906 bytes --]

Hi,

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?

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.

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.

Hamish


[-- Attachment #1.1.2: 0x87B761FE07F548D6.asc --]
[-- Type: application/pgp-keys, Size: 3235 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mintty text glitches when using up key
  2020-08-27 16:55 Mintty text glitches when using up key Hamish McIntyre-Bhatty
@ 2020-08-27 19:55 ` Brian Inglis
  2020-08-28  8:33   ` Thomas Wolff
  0 siblings, 1 reply; 8+ messages in thread
From: Brian Inglis @ 2020-08-27 19:55 UTC (permalink / raw)
  To: cygwin

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?
> 
> 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.
> 
> 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.]

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mintty text glitches when using up key
  2020-08-27 19:55 ` Brian Inglis
@ 2020-08-28  8:33   ` Thomas Wolff
  2020-08-28 14:31     ` Hamish McIntyre-Bhatty
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Wolff @ 2020-08-28  8:33 UTC (permalink / raw)
  To: cygwin

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.]
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mintty text glitches when using up key
  2020-08-28  8:33   ` Thomas Wolff
@ 2020-08-28 14:31     ` Hamish McIntyre-Bhatty
  2020-08-28 15:13       ` Thomas Wolff
  0 siblings, 1 reply; 8+ messages in thread
From: Hamish McIntyre-Bhatty @ 2020-08-28 14:31 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1.1: Type: text/plain, Size: 2796 bytes --]

On 28/08/2020 09:33, Thomas Wolff wrote:
> 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.
>
My apologies. I mean when a the command with its arguments are long
enough to wrap around the width of the Mintty window.

>>> 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
>
Good to know.
>>>
>>> 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

[-- Attachment #1.1.2: 0x87B761FE07F548D6.asc --]
[-- Type: application/pgp-keys, Size: 3235 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mintty text glitches when using up key
  2020-08-28 14:31     ` Hamish McIntyre-Bhatty
@ 2020-08-28 15:13       ` Thomas Wolff
  2020-08-28 15:48         ` Hamish McIntyre-Bhatty
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Wolff @ 2020-08-28 15:13 UTC (permalink / raw)
  To: cygwin

Am 28.08.2020 um 16:31 schrieb Hamish McIntyre-Bhatty via Cygwin:
> On 28/08/2020 09:33, Thomas Wolff wrote:
>> 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.
>>
> My apologies. I mean when a the command with its arguments are long
> enough to wrap around the width of the Mintty window.
That works fine normally but fails under certain additional conditions. 
Please provide a reproducible test case in order to get suitable 
comments. Also, which shell do you use?
Thomas


>>>> 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
>>
> Good to know.
>>>> 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
>>
>> --
>> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mintty text glitches when using up key
  2020-08-28 15:13       ` Thomas Wolff
@ 2020-08-28 15:48         ` Hamish McIntyre-Bhatty
  2020-08-28 16:45           ` Thomas Wolff
  0 siblings, 1 reply; 8+ messages in thread
From: Hamish McIntyre-Bhatty @ 2020-08-28 15:48 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1.1: Type: text/plain, Size: 584 bytes --]

On 28/08/2020 16:13, Thomas Wolff wrote:
> Am 28.08.2020 um 16:31 schrieb Hamish McIntyre-Bhatty via Cygwin:
>> My apologies. I mean when a the command with its arguments are long
>> enough to wrap around the width of the Mintty window.
> That works fine normally but fails under certain additional
> conditions. Please provide a reproducible test case in order to get
> suitable comments. Also, which shell do you use?
> Thomas

Okay, I'll see if I can come up with a test case.

If I can, would it be better for me to file a bug on GitHub for this as
well?

Hamish


[-- Attachment #1.1.2: 0x87B761FE07F548D6.asc --]
[-- Type: application/pgp-keys, Size: 3235 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mintty text glitches when using up key
  2020-08-28 15:48         ` Hamish McIntyre-Bhatty
@ 2020-08-28 16:45           ` Thomas Wolff
  2020-09-02 15:28             ` Hamish McIntyre-Bhatty
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Wolff @ 2020-08-28 16:45 UTC (permalink / raw)
  To: cygwin

Am 28.08.2020 um 17:48 schrieb Hamish McIntyre-Bhatty via Cygwin:
> On 28/08/2020 16:13, Thomas Wolff wrote:
>> Am 28.08.2020 um 16:31 schrieb Hamish McIntyre-Bhatty via Cygwin:
>>> My apologies. I mean when a the command with its arguments are long
>>> enough to wrap around the width of the Mintty window.
>> That works fine normally but fails under certain additional
>> conditions. Please provide a reproducible test case in order to get
>> suitable comments. Also, which shell do you use?
>> Thomas
> Okay, I'll see if I can come up with a test case.
>
> If I can, would it be better for me to file a bug on GitHub for this as well?
Likely not as I firmly believe it's not a terminal issue.

>
> Hamish
>
>
> --
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mintty text glitches when using up key
  2020-08-28 16:45           ` Thomas Wolff
@ 2020-09-02 15:28             ` Hamish McIntyre-Bhatty
  0 siblings, 0 replies; 8+ messages in thread
From: Hamish McIntyre-Bhatty @ 2020-09-02 15:28 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1.1: Type: text/plain, Size: 1103 bytes --]

On 28/08/2020 17:45, Thomas Wolff wrote:
> Am 28.08.2020 um 17:48 schrieb Hamish McIntyre-Bhatty via Cygwin:
>> On 28/08/2020 16:13, Thomas Wolff wrote:
>>> Am 28.08.2020 um 16:31 schrieb Hamish McIntyre-Bhatty via Cygwin:
>>>> My apologies. I mean when a the command with its arguments are long
>>>> enough to wrap around the width of the Mintty window.
>>> That works fine normally but fails under certain additional
>>> conditions. Please provide a reproducible test case in order to get
>>> suitable comments. Also, which shell do you use?
>>> Thomas
>> Okay, I'll see if I can come up with a test case.
>>
>> If I can, would it be better for me to file a bug on GitHub for this
>> as well?
> Likely not as I firmly believe it's not a terminal issue.

I suspect you are correct. After trying to cause the problem in a few
different ways, I have not been able to do so. I guess it's either not a
bug at all, or it occurs so rarely/in such a small corner case that it's
very hard to pin down.

Apologies for the noise, and thank you all for your hard work on Cygwin.

Hamish


[-- Attachment #1.1.2: 0x87B761FE07F548D6.asc --]
[-- Type: application/pgp-keys, Size: 3235 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-02 15:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 16:55 Mintty text glitches when using up key Hamish McIntyre-Bhatty
2020-08-27 19:55 ` Brian Inglis
2020-08-28  8:33   ` Thomas Wolff
2020-08-28 14:31     ` Hamish McIntyre-Bhatty
2020-08-28 15:13       ` Thomas Wolff
2020-08-28 15:48         ` Hamish McIntyre-Bhatty
2020-08-28 16:45           ` Thomas Wolff
2020-09-02 15:28             ` Hamish McIntyre-Bhatty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).