Summary: | Last line gets deleted in output after resizing window, sometimes | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Daniel <leva> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | adaptee, b.brachaczek, cpigat242, egmont, kdebugs, walch.martin |
Priority: | NOR | ||
Version: | 2.2.3 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.8 | |
Sentry Crash Report: | |||
Attachments: |
do not erase the bottem line when resizing
worksforme screencast |
Description
Daniel
2009-05-10 13:07:33 UTC
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. |