Bug 192222

Summary: last line gets deleted in output when only one tab remains
Product: [Applications] konsole Reporter: Daniel <leva>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 2.2.3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel 2009-05-10 13:08:19 UTC
Version:           2.2.3 (using Devel)
OS:                Linux
Installed from:    Compiled sources

Okay this is a tricky one (and the Short description isn't too descriptive), quite a few options must play together, but it can be reproduced easily in real life:

1. Start Konsole, and configure it like this: Edit Current Profile -> Tabs -> Tab bar display (Show Tab Bar When Needed)
2. Type a lot of <Enter>s in the terminal so the prompt will be at the last line at the bottom.
3. Exec `echo -n "last line test"; read`
4. Open a new tab (so there will be 2 tabs); the Tab Bar must appear.
5. Switch to the newly opened tab (if it isn't already  active), and close it, either by pressing the Close button, typing exit, pressing Ctrl+D or whatever.
6. Now we're back at the original tab, the Tab Bar got hidden, and the last line ("last line test") got erased.

The second (2.) step is important or else it can't get reproduced. It is also crucial, that it would be the next to last tab, that you close, thus there are no other tabs opened at the end but the one in which you started the `echo ....` command.
This test case might seem weird, but this can happen so easy and many times if one runs scripts or applications which fills the whole window with output (thus the prompt or cursor will be at the last line in Konsole) and then waits for some input. Then you close a tab which was opened before and you're there with an empty line wondering what was the output or question of the script which is waiting for input.


Here is another way to reproduce it:

1. Start Konsole, and configure it like this: Edit Current Profile -> Tabs -> Tab bar display (Always Show Tab Bar)
2. Type a lot of <Enter>s in the terminal so the prompt will be at the last line at the bottom.
3. Exec `echo -n "last line test"; read`
4. Get back to Edit Current Profile -> Tabs
5. Change "Tab bar display" to "Always Hide Tab Bar"
6. The last line ("last line test") got erased.
Comment 1 Pino Toscano 2009-05-10 13:29:43 UTC
Reported already (bug #192221).