summaryrefslogtreecommitdiff
path: root/core/apps
Side-by-side diff
Diffstat (limited to 'core/apps') (more/less context) (show whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEScreen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp
index 8e69a88..1db34d2 100644
--- a/core/apps/embeddedkonsole/TEScreen.cpp
+++ b/core/apps/embeddedkonsole/TEScreen.cpp
@@ -1117,50 +1117,50 @@ QString TEScreen::getSelText(const BOOL preserve_line_breaks)
m[d++] = ' ';
}
}
else
{
m[d++] = ((preserve_line_breaks ||
((eol % columns) == 0)) ?
'\n' : ' ');
}
}
s = (eol / columns + 1) * columns;
}
}
QChar* qc = new QChar[d];
for (int i = 0; i < d; i++)
{
qc[i] = m[i];
}
QString res(qc, d);
- delete m;
- delete qc;
+ delete [] m;
+ delete [] qc;
return res;
}
/* above ... end of line processing for selection -- psilva
cases:
1) (eol+1)%columns == 0 --> the whole line is filled.
If the last char is a space, insert (preserve) space. otherwise
leave the text alone, so that words that are broken by linewrap
are preserved.
FIXME:
* this suppresses \n for command output that is
sized to the exact column width of the screen.
2) eol%columns == 0 --> blank line.
insert a \n unconditionally.
Do it either you would because you are in preserve_line_break mode,
or because it's an ASCII paragraph delimiter, so even when
not preserving line_breaks, you want to preserve paragraph breaks.
3) else --> partially filled line
insert a \n in preserve line break mode, else a space
The space prevents concatenation of the last word of one