Vcs: Do not freeze when the user starts its commit message with <Tab>

Task-number: QTCREATORBUG-11614

Change-Id: Ide2fe81250f3c1331a7f54be827e7dd8f551fdc6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2014-03-03 12:47:01 +01:00
parent 2224472374
commit 956744dff8

View File

@@ -303,6 +303,7 @@ static QString wrappedText(const QTextEdit *e)
const QString block = cursor.block().text(); const QString block = cursor.block().text();
if (block.startsWith(QLatin1Char('\t'))) { // Don't wrap if (block.startsWith(QLatin1Char('\t'))) { // Don't wrap
rc += block + newLine; rc += block + newLine;
cursor.movePosition(QTextCursor::EndOfBlock);
} else { } else {
forever { forever {
cursor.select(QTextCursor::LineUnderCursor); cursor.select(QTextCursor::LineUnderCursor);