summaryrefslogtreecommitdiff
path: root/core/apps
Unidiff
Diffstat (limited to 'core/apps') (more/less context) (ignore 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)
1117 m[d++] = ' '; 1117 m[d++] = ' ';
1118 } 1118 }
1119 } 1119 }
1120 else 1120 else
1121 { 1121 {
1122 m[d++] = ((preserve_line_breaks || 1122 m[d++] = ((preserve_line_breaks ||
1123 ((eol % columns) == 0)) ? 1123 ((eol % columns) == 0)) ?
1124 '\n' : ' '); 1124 '\n' : ' ');
1125 } 1125 }
1126 } 1126 }
1127 1127
1128 s = (eol / columns + 1) * columns; 1128 s = (eol / columns + 1) * columns;
1129 } 1129 }
1130 } 1130 }
1131 1131
1132 QChar* qc = new QChar[d]; 1132 QChar* qc = new QChar[d];
1133 1133
1134 for (int i = 0; i < d; i++) 1134 for (int i = 0; i < d; i++)
1135 { 1135 {
1136 qc[i] = m[i]; 1136 qc[i] = m[i];
1137 } 1137 }
1138 1138
1139 QString res(qc, d); 1139 QString res(qc, d);
1140 1140
1141 delete m; 1141 delete [] m;
1142 delete qc; 1142 delete [] qc;
1143 1143
1144 return res; 1144 return res;
1145} 1145}
1146/* above ... end of line processing for selection -- psilva 1146/* above ... end of line processing for selection -- psilva
1147cases: 1147cases:
1148 1148
11491) (eol+1)%columns == 0 --> the whole line is filled. 11491) (eol+1)%columns == 0 --> the whole line is filled.
1150 If the last char is a space, insert (preserve) space. otherwise 1150 If the last char is a space, insert (preserve) space. otherwise
1151 leave the text alone, so that words that are broken by linewrap 1151 leave the text alone, so that words that are broken by linewrap
1152 are preserved. 1152 are preserved.
1153 1153
1154FIXME: 1154FIXME:
1155 * this suppresses \n for command output that is 1155 * this suppresses \n for command output that is
1156 sized to the exact column width of the screen. 1156 sized to the exact column width of the screen.
1157 1157
11582) eol%columns == 0 --> blank line. 11582) eol%columns == 0 --> blank line.
1159 insert a \n unconditionally. 1159 insert a \n unconditionally.
1160 Do it either you would because you are in preserve_line_break mode, 1160 Do it either you would because you are in preserve_line_break mode,
1161 or because it's an ASCII paragraph delimiter, so even when 1161 or because it's an ASCII paragraph delimiter, so even when
1162 not preserving line_breaks, you want to preserve paragraph breaks. 1162 not preserving line_breaks, you want to preserve paragraph breaks.
1163 1163
11643) else --> partially filled line 11643) else --> partially filled line
1165 insert a \n in preserve line break mode, else a space 1165 insert a \n in preserve line break mode, else a space
1166 The space prevents concatenation of the last word of one 1166 The space prevents concatenation of the last word of one