FIX: display of Label and warning dialog

Change-Id: Ib147f28096336b07b033c2e8104a56f5c28b7d93
This commit is contained in:
tao.jin authored and Lane.Wei committed 2023-02-22 20:09:17 +08:00
1 parent 7c728452a2
commit c2eeb2522b
4 files changed
+78 -56

No files matched your search

+9 -5
View File
@@ -116,16 +116,20 @@ public:
// Find the last word to chop off.
size_t lastSpace = posEnd;
while (lastSpace != size_t(-1)) {
while (lastSpace > 0) {
auto c = line[lastSpace];
if (c == ' ' || c > 0x4E00)
if (c == ' ')
break;
if (c > 0x4E00) {
if (lastSpace != posEnd)
++lastSpace;
break;
}
--lastSpace;
}
if (lastSpace == size_t(-1)) {
if (lastSpace == 0) {
// No spaces, so can't wrap.
DoOutputLine(line);
break;
lastSpace = posEnd;
}
// Output the part that fits.