bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer corruption when the terminal is resized.


From: Paul Peet
Subject: Re: Buffer corruption when the terminal is resized.
Date: Mon, 12 Jun 2017 20:24:20 +0200

I guess this is why I don't get the garbage output with gnome-terminal
and dash. Dash doesn't use readline apparently.

So, what can be done to actually fix this?

On Mon, Jun 12, 2017 at 7:55 PM, Chet Ramey <address@hidden> wrote:
> On 6/12/17 1:38 PM, Paul Peet wrote:
>> Uhmm, I am not sure how to interpret these results (All shells or
>> terminals have been tested with Ubuntu 17.04):
>>
>> gnome-terminal + bash: Happens
>> gnome-terminal + zsh: This bug also happens here, lines are getting
>> removed/repeated...
>> gnome-terminal + dash: Does not happen. (I changed the
>> PS1="address@hidden $" to make it longer)
>> gnome-terminal + mksh: The bug also occured here. Same as bash and zsh.
>
> I suspect this happens due to mismatched expectations. The cases with
> garbled output seem to occur where the redisplay engine assumes the
> terminal maintains the text across resizes (so it can do intelligent
> redisplay using what's already on the screen) and the terminal emulator
> assumes the foreground process is going to take care of doing all the
> redisplay after a SIGWINCH and doesn't bother with the screen contents.
>
> The readline redisplay engine assumes that the only characters on the
> screen are those it writes.  If that assumption is violated on a size
> change, you'll get indeterminate results.
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]