Commit 4843f44c authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Don't allow auto parentheses when the token under cursor is a comment.

parent 5df7b967
......@@ -1435,8 +1435,12 @@ bool CPPEditor::contextAllowsAutoParentheses(const QTextCursor &cursor) const
CPlusPlus::TokenUnderCursor tokenUnderCursor;
const SimpleToken tk = tokenUnderCursor(cursor);
if (tk.isComment())
return false;
if (tk.isComment()) {
const int pos = cursor.selectionEnd();
if (pos < tk.end())
return false;
return true;
Supports Markdown
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