[Konsole-devel] [Bug 188528] konsole's history adds spaces to end of lines when copying text

tomasb at kapsa.cz tomasb at kapsa.cz
Sun Aug 21 20:03:36 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=188528





--- Comment #94 from  <tomasb kapsa cz>  2011-08-21 20:03:35 ---
Created an attachment (id=63027)
 --> (http://bugs.kde.org/attachment.cgi?id=63027)
Distinguish between real space and cleaning character

No, it really didn't solve anything, only adds another bug. Did you read the
discussion?

Anyway, I'm attaching something to discussion. To my knowledge problem is that
Screen::clearImage clears screen buffer by writing spaces to it. Of course it
*is* desiderable to write characters to screen ie. to be able to clear screen
with some background color as in mcedit.

So lets flag these cleaning spaces (as opposite to actual spaces comming from
input) with new special flag RE_CLEAR_CHAR. If you want to see, what I'm
calling cleaning spaces, go to Screen::clearImage and temporarily set c to '!'
at the begining of function.

Now we need to do a filtering similar to proposed one in patch on comment 80,
but not in Screen::copyLineToStream! PlainTextDecoder::decodeLine is IMHO right
place. There even was some sort of filtering, but was not working.

At first, it was not working in mc, because _includeTrailingWhitespace was
wrongly set, so it wasn't removing empty line ending in mcedit. Secondly,
because newline char was at the line end after spaces, it wasn't removing
anything.

I'm also looked into problems with tab characters, which are not handled
properly. I was only partialy successful, still I'm not fully understanding
line wrapping and how to deal with tabs on line end properly, so this is not
included.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list