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.
Here is a new and even simpler way to reproduce this: 1. Start Konsole 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. Maximize the Konsole window. 5. The last line ("last line test") got erased. <- the bug
Looks like a duplicate of Bug #183303, which describes yet another way to reproduce it.
*** Bug 183303 has been marked as a duplicate of this bug. ***
*** This bug has been confirmed by popular vote. ***
Created attachment 62275 [details] do not erase the bottem line when resizing This one liner patch will eliminate the problem. However, I am not sure that patch is really correct and would not cause other problems, because I do not quite understand why the Screen class always allocate spaces for N+1 lines when it is set to has N lines.
Wow, a more than 2 years old bug. And it's not the only one :D KDE has gotten ridiculous a long time ago...
Git commit ca3ef60d6da099f46969eaebcdbfaf3b20761505 by Jekyll Wu. Committed on 21/09/2011 at 19:35. Pushed by jekyllwu into branch 'master'. Fix the problem of possibly losing the last line after resizing window. This is a simple one-line patch, so it can be reverted easily if unfortunately needed. BUG:192221 FIXED-IN:4.8 REVIEW:102177 M +1 -1 src/Screen.cpp http://commits.kde.org/konsole/ca3ef60d6da099f46969eaebcdbfaf3b20761505
I'm using version 2.10.5 (KDE 4.10.5) on Kubuntu 13.04, and this problem persists. To reproduce, simply run "echo -n foobar", then do any of the following: - Resize the window to a different number of columns/lines. - Maximize or restore the window. - Press Ctrl+Shift+F, or select the "Find" function from the menus. Your "foobar" will be obliterated.
Still a problem in 2.11.3 (KDE 4.11.5) on Kubuntu 13.10. See comment 8. This isn't fixed!
(In reply to comment #9) > Still a problem in 2.11.3 (KDE 4.11.5) on Kubuntu 13.10. See comment 8. > This isn't fixed! Well, I cannot reproduce it in 4.12.3. At least not the way you described. I suggest trying Kubuntu 14.04 LiveCD (may be in a vm), checking it there and filing a new bug report if it's still a problem there.
I can reproduce it in Konsole 2.12.3 (KDE 4.12.3) with bash 4.2.45(1) as described. The -n switch of echo is important to suppress the trailing newline. Maybe it helps when I describe it in more detail: - run Konsole with bash in it - the exact prompt does not seem to matter, but lets set it to a constant string: PS1="P: " - now execute the echo command echo -n foobar The last two lines of the Konsole window (not necessarily at the bottom of the window) should look like this: P: echo -n foobar foobarP: As you can see, the prompt is printed immediately after foobar. When now resizing the window in a way that adds a line to the running bash, the last line is deleted and the prompt is reprinted. Now the two lines from above have changed to: P: echo -n foobar P:
Yes, still there - follow comment #11 instructions.
Created attachment 85826 [details] worksforme screencast I still cannot reproduce it. I am attaching a screencast. What am I doing wrong?
Ah, I got it. In my case I need to start typing after the resize, only then the prompt is reprinted and "foobar" disappears. So, yeah, I can confirm the bug.
I can see this bug with the (konsole-based) cool-retro-term [https://github.com/Swordfish90/cool-retro-term]. Press Enter multiple times until you reach the bottom, then resize horizontally. The prompt disappears in the last line, only the cursor remains. This could be a cool-retro-term bug, but the coincidence with this one makes it suspicious that it's actually the same bug.