Commit 84a8ae68 authored by Waldo Bastian's avatar Waldo Bastian
Browse files

WABA:

svn path=/branches/KDE_1_1_BRANCH/kdebase/konsole/; revision=29505
parent 49963c57
......@@ -1043,12 +1043,12 @@ char *TEScreen::getSelText(const BOOL preserve_line_breaks)
// allocate buffer for maximum possible size...
d = (sel_BR - sel_TL)/columns + 1 ;
m = (char*) malloc( sizeof(char) * d * (columns+1) + 2 );
m = (char*) malloc( d * (columns+1) + 2 );
d = 0;
while ( s <= sel_BR )
{
if ( s < hist_BR )
if ( s < hist_BR+columns )
{ // get lines from history buffer.
eol=histBuffer[hY]->len;
if ((hY == (sel_BR/columns)) && (eol >= (sel_BR%columns)) ) eol=sel_BR%columns+1;
......@@ -1088,7 +1088,7 @@ char *TEScreen::getSelText(const BOOL preserve_line_breaks)
if ( (eol+1)%columns == 0) {
if (image[eol-hist_BR-columns].c == ' ') m[d++]=' ';
}
else m[d++]=(preserve_line_breaks||((eol%columns)==0)?'\n':' ');
else m[d++]=((preserve_line_breaks||((eol%columns)==0))?'\n':' ');
}
s = ( eol/columns + 1)*columns;
}
......
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