Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
4843f44c
Commit
4843f44c
authored
Sep 18, 2009
by
Roberto Raggi
Browse files
Don't allow auto parentheses when the token under cursor is a comment.
parent
5df7b967
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
4843f44c
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment