AutoCompleter: Avoid overzealously eating trailing }.

Task-number: QTCREATORBUG-4128
Reviewed-by: Leandro Melo
This commit is contained in:
Christian Kamm
2011-04-21 14:19:47 +02:00
parent ed5216560f
commit 9285f0920f

View File

@@ -308,7 +308,10 @@ int AutoCompleter::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor,
cursor.insertText(textToInsert);
cursor.setPosition(pos);
m_allowSkippingOfBlockEnd = true;
// if we actually insert a separator, allow it to be overwritten if
// user types it
if (!textToInsert.isEmpty())
m_allowSkippingOfBlockEnd = true;
return 1;
}