Commit b5dbcee3 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Take the selected end as look ahead

Cause that's the relevant context.
parent 0fed004a
......@@ -1277,7 +1277,7 @@ QString CPPEditor::autoComplete(QTextCursor &cursor, const QString &text) const
return QString();
QString autoText;
QChar lookAhead = characterAt(cursor.position());
QChar lookAhead = characterAt(cursor.selectionEnd());
if (lookAhead.isSpace() // Only auto-insert when the text right of the cursor seems unrelated
|| lookAhead == QLatin1Char('{')
|| lookAhead == QLatin1Char('}')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment