Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalCharacterDecoder.cpp
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 79 | { | |||
---|---|---|---|---|---|
134 | 134 | | |||
135 | for (int i = start; i < outputCount;) { | 135 | for (int i = start; i < outputCount;) { | ||
136 | if ((characters[i].rendition & RE_EXTENDED_CHAR) != 0) { | 136 | if ((characters[i].rendition & RE_EXTENDED_CHAR) != 0) { | ||
137 | ushort extendedCharLength = 0; | 137 | ushort extendedCharLength = 0; | ||
138 | const uint* chars = ExtendedCharTable::instance.lookupExtendedChar(characters[i].character, extendedCharLength); | 138 | const uint* chars = ExtendedCharTable::instance.lookupExtendedChar(characters[i].character, extendedCharLength); | ||
139 | if (chars != nullptr) { | 139 | if (chars != nullptr) { | ||
140 | const QString s = QString::fromUcs4(chars, extendedCharLength); | 140 | const QString s = QString::fromUcs4(chars, extendedCharLength); | ||
141 | plainText.append(s); | 141 | plainText.append(s); | ||
142 | i += qMax(1, string_width(s)); | 142 | i += qMax(1, Character::stringWidth(s)); | ||
143 | } else { | 143 | } else { | ||
144 | ++i; | 144 | ++i; | ||
145 | } | 145 | } | ||
146 | } else { | 146 | } else { | ||
147 | // All characters which appear before the last real character are | 147 | // All characters which appear before the last real character are | ||
148 | // seen as real characters, even when they are technically marked as | 148 | // seen as real characters, even when they are technically marked as | ||
149 | // non-real. | 149 | // non-real. | ||
150 | // | 150 | // | ||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |