elgarfo / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Increasing the width shows text from previous lines #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This seems to be related to the fix for issue 61.

What steps will reproduce the problem?
1. start mintty
2. set window size to 80x25
3. execute "ls -l /"
4. decrease window size to 40x25
5. execute "ls -l /var"
6. increase window size to 80x25

What is the expected output? What do you see instead?
I would expect the part of the window to the right of the wrapped
lines (from step 5) to remain empty.

Instead, a block of text from step 3 is pasted to the right of 
the wrapped lines from step 5.

See attachment: mintty-window-contents.txt 

What version of the product are you using? On what operating system?
$ mintty -V; uname -s -r -m -o
MinTTY 0.4-rc1
Copyright (C) 2008-09 Andy Koppe
Licensed under GPL version 3 or later.
There is no warranty, to the extent permitted by law.
CYGWIN_NT-5.1 1.5.25(0.156/4/2) i686 Cygwin

Please provide any additional information below.

The attachment contains the full buffer of mintty. Of course, only the
last 25 lines are visible after step 6.

Original issue reported on code.google.com by servaasg on 5 May 2009 at 12:14

Attachments:

GoogleCodeExporter commented 9 years ago
Weird. The fix for for issue 61 did seem a bit too easy at the time. I'll 
revert and
reopen that then, since this is quite a bit worse than the old behaviour.

Original comment by andy.koppe on 5 May 2009 at 6:43

GoogleCodeExporter commented 9 years ago
Fixed in r300 by reverting issue 61 hack.

Original comment by andy.koppe on 6 May 2009 at 6:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I agree. 

Looking at the code (which I don't fully understand yet), it seems that the 
last two
lines of resizeline() fail to clear the new space. This must be caused by not
decreasing line->cols when the window width is decreased. 

If you keep the fix for issue 61, then clearing the new space should not start 
at
oldcols but at the old window width (which can be less than oldcols). I can't 
tell
whether this is feasible, though. And I suppose there may be better ways to 
solve this.

Original comment by servaasg on 6 May 2009 at 7:07

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 7 Jun 2009 at 7:36