Clear formatting if there is no number

Task-number: QTCREATORBUG-10132
Change-Id: Ib0f6deac4d66273a1a2cc59d397134588fbd3032
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Petar Perisin
2013-09-09 22:49:36 +03:00
parent 967cebcef2
commit 7a24da8a51

View File

@@ -115,6 +115,11 @@ QList<StringFormatPair> AnsiEscapeCodeHandler::parseText(const QString &text,
}
strippedText.remove(0, 1);
if (numbers.isEmpty()) {
charFormat = defaultFormat;
endFormatScope();
}
for (int i = 0; i < numbers.size(); ++i) {
const int code = numbers.at(i).toInt();