Fixed the completion to take into account auto parentheses insertion

Also skip semicolons in when auto parentheses insertion is enabled.

Done with mae.
This commit is contained in:
Thorbjørn Lindeijer
2009-09-16 16:48:14 +02:00
parent 9ff527e2aa
commit b8b37cb0b5
2 changed files with 22 additions and 7 deletions

View File

@@ -1091,9 +1091,10 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
bool skip = false;
QChar first = text.at(0);
if (first == QLatin1Char(')')) {
skip = (first == lookAhead);
} else if (first == QLatin1Char(']')) {
if (first == QLatin1Char(')')
|| first == QLatin1Char(']')
|| first == QLatin1Char(';')
) {
skip = (first == lookAhead);
} else if (first == QLatin1Char('\"') || first == QLatin1Char('\'')) {
if (first == lookAhead) {