Bug 149562 - Clear Scrollback & Reset should return immediately the prompt
Summary: Clear Scrollback & Reset should return immediately the prompt
Status: RESOLVED DUPLICATE of bug 242110
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: 2007-09-05 11:52 UTC by Haris Kouzinopoulos
Modified: 2011-02-08 16:37 UTC (History)
2 users (show)

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 Haris Kouzinopoulos 2007-09-05 11:52:01 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

When i press Clear Scrollback & Reset, konsole presents a white screen and i must press enter to have back the prompt. 
The expected behaviour would be to clear the screen and return back to the prompt immediately.
Comment 1 Robert Knight 2007-09-05 21:21:38 UTC
The shell will be ready to receive commands after "Clear Scrollback & Reset" is triggered, it is just that the prompt text gets removed in the process of clearing the screen.

I'm not sure of the best way to do this.  One would be to keep the last line of the previous contents of the display intact and move it to the top of the screen.  However this will not clear any extra rubbish which has been printed to the terminal by other processes (which does happen sometimes) or help with multi-line prompts.

For now I committed a trick which sets the window size information (shared between the shell and Konsole) to a slightly larger size and then back to normal gain.  That works for bash, but not zsh or fish.
Comment 2 Matthew Woehlke 2007-09-05 21:42:20 UTC
There isn't much that can be done here, since any "fixes" depend on what program is currently running (this can of course be bash). For example, vim will simply be very confused after resetting the tty.

This is why I find a better solution is to use a "magic program" to achieve this effect instead of ever using Konsole's "reset terminal" command. In KDE3 I did this with dcop, which was a pain because it only works for local logins. In KDE4, Konsole recognizes commands "sent" via escape sequences that will allow this to be achieved by writing a special string to the tty's stdout (to turn scrollback off and then back on, plus the usual ANSI 'clear terminal' sequence).

But it's nice that there is a solution for bash, as this is probably the most common case.
Comment 3 Haris Kouzinopoulos 2007-09-06 09:24:34 UTC
Thanks for the fix, the problem seems solved now (at least for me)
Comment 4 Ahmad Samir 2010-07-30 01:37:16 UTC
This bug seems to be back with KDE4.5RC1 and RC2. Should I open a new report?
Comment 5 José Manuel Santamaría Lema 2011-02-08 16:37:02 UTC

*** This bug has been marked as a duplicate of bug 242110 ***