forked from qt-creator/qt-creator
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user