Bug 155812 - Lines are left scattered in the terminal on resizing
Summary: Lines are left scattered in the terminal on resizing
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-15 10:28 UTC by Enrico
Modified: 2008-01-16 02:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrico 2008-01-15 10:28:34 UTC
Version:            (using KDE KDE 4.0.0)
Installed from:    Compiled From Sources

I can't quite describe it, so I'll make an example.

cd to some long path, e.g.

cd /kde/src/KDE/kdebase/apps/konsole/developer-doc/old-documents/More

so that the prompt will be something like
user@machine:/kde/src/KDE/kdebase/apps/konsole/developer-doc/old-documents/More

Resize the terminal window and make it very narrow, then make it larger again.

Text doesn't properly wrap and unwrap, but remains scattered on the screen.

If I keep making the window larger and narrower, so that the prompt keeps changing from 1 line to 2 lines, lines further up on the screen are deleted.
Comment 1 Robert Knight 2008-01-15 15:03:42 UTC
I think I have seen this before, where it turned out to be an issue with the bash shell which can be seen in all terminals. 
Comment 2 Enrico 2008-01-15 15:36:25 UTC
This happens with Ubuntu and its default prompt. I tested konsole3, gnome terminal and xterm. All of them have troubles, but konsole4 is the worse. The problem with konsole4 is that funny things start happening when the terminal has a reasonable size, not just when it is made unrealistically small.
Comment 3 Robert Knight 2008-01-15 16:42:35 UTC
Results of some additional testing.

Steps to reproduce:

1.  Change the prompt string so that it is very long (eg. 80 characters). (export PS1=<long string>)
2.  Write a lengthy string after the prompt (eg. <prompt> <long string> )
3.  Narrow the terminal window so that the prompt part of the command-line wraps over two or more lines.
4.  Widen the terminal window back to its original size.  Spurious lines will be left on the screen.

This is not reproducible with the zsh shell and occurs in gnome-terminal,xterm and Konsole 3/4, all of which have different terminal emulation backends, which leads me to suspect a bug in bash.

> The problem with konsole4 is that funny things start
> happening when the terminal has a reasonable size,

I couldn't reproduce this.  Make sure that all the terminals are using the same text size.


Comment 4 Enrico 2008-01-15 20:37:33 UTC
The same happens with opensuse, but you are right, it's not konsole4-specific.
Comment 5 Robert Knight 2008-01-16 02:39:06 UTC
I'm pretty sure this is a bash problem.  A quick scan of the bash bugs list reveals quite a few reports in this area.  Unfortunately bash uses a simple mailing list instead of a proper bug tracker so following the issues is not easy.