Commit a1d0a1d3 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix issue where history lines had extra spaces at end.

Thanks to Orion Poplawski for patch.

I will backport to 4.4.1 later.

BUG: 188528

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1083161
parent 4c4284f4
......@@ -645,16 +645,9 @@ void Screen::displayCharacter(unsigned short c)
// ensure current line vector has enough elements
int size = screenLines[cuY].size();
if (size == 0 && cuY > 0)
if (size < cuX+w)
{
screenLines[cuY].resize( qMax(screenLines[cuY-1].size() , cuX+w) );
}
else
{
if (size < cuX+w)
{
screenLines[cuY].resize(cuX+w);
}
screenLines[cuY].resize(cuX+w);
}
if (getMode(MODE_Insert)) insertChars(w);
......@@ -1230,19 +1223,6 @@ int Screen::copyLineToStream(int line ,
Character* data = screenLines[screenLine].data();
int length = screenLines[screenLine].count();
// Don't remove end spaces in lines that wrap
if (!(lineProperties[screenLine] & LINE_WRAPPED))
{
// ignore trailing white space at the end of the line
for (int i = length-1; i >= 0; i--)
{
if (data[i].character == ' ')
length--;
else
break;
}
}
//retrieve line from screen image
for (int i=start;i < qMin(start+count,length);i++)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment