[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer corruption when the terminal is resized.
From: |
Chet Ramey |
Subject: |
Re: Buffer corruption when the terminal is resized. |
Date: |
Mon, 12 Jun 2017 13:55:37 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
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="username@hostname $" 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 chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Buffer corruption when the terminal is resized., Paul Peet, 2017/06/10
- Re: Buffer corruption when the terminal is resized., Eduardo Bustamante, 2017/06/10
- Re: Buffer corruption when the terminal is resized., George, 2017/06/10
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/10
- Re: Buffer corruption when the terminal is resized., Eduardo Bustamante, 2017/06/10
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/10
- Re: Buffer corruption when the terminal is resized., Eduardo Bustamante, 2017/06/10
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/10
- Re: Buffer corruption when the terminal is resized., Eduardo Bustamante, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/12
- Re: Buffer corruption when the terminal is resized.,
Chet Ramey <=
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Chet Ramey, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Chet Ramey, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Chet Ramey, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Chet Ramey, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Paul Peet, 2017/06/12
- Re: Buffer corruption when the terminal is resized., Chet Ramey, 2017/06/17