when tthe bash prompt is very long (for instance being in a very long path) is possible to make the rendering misbehave a lot by painting over and over the bash prompt over many lines. It seems to also depend from colored bash prompt, here is my PS1: PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] ' Steps: 1) reduce the window size to make the bash prompt wordwrap 2) copy some text from konsole 3) paste it so that the pasted text wraps as well 4) enlarge the window 5) shrink it again, pieces of the bash prompt will be painted on multiple lines
Created attachment 152109 [details] Graphical steps to trigger the bug
When the konsole window is in this garbled state, another issue happens: if i copy a text that wraps on the two last lines, then when i past it it will have a \n character corresponding to where it was wrapping. This because in Screen.cpp _lineProperties will *not* have the LINE_WRAPPED on the last wrapped line. I was originally investigating this as i had a report on this happening (not together the descived bug) but this glitch is the only way i made this happening, so they may be related but not 100% sure
further investigating, when the garbled text happens, this is what Pty::dataReceived() sees arriving from bash: \r\u001B[K\u001B[A\u001B[01;32mdiau@phobos\u001B[01;34m ~/git/kf5/build/kde/applications/konsole/thisisaverylongdirectorynametoreproducebugs\u001B[01;33m\u001B[01;34m $\u001B[00m t/kf5/build/kde/appli\r\n\rcations/konsole/thisisaverylongdirectorynametoreproduceb note the point kde/appli\r\n\rcations/konsole this is where the word wrap of the long command happened, and since konsole informs bash about the window size, bash will produce text "already wrapped" so that konsole doesn't know anymore the last line is wrapped, producing probably the \n in the copied text and making the prompt redraw in the wrong line when resizing producing the garbled text
Yes, I think there are other BR about this or at least I recall seeing this issue before.
*** Bug 438974 has been marked as a duplicate of this bug. ***