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
66f2e323
Commit
66f2e323
authored
Sep 16, 2009
by
Thorbjørn Lindeijer
Browse files
Fixed the context in which automatic parentheses are placed
Done with mae and Roberto Raggi.
parent
d11af451
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
66f2e323
...
...
@@ -1272,7 +1272,10 @@ bool CPPEditor::contextAllowsAutoParentheses(const QTextCursor &cursor) const
{
CPlusPlus
::
TokenUnderCursor
tokenUnderCursor
;
const
SimpleToken
tk
=
tokenUnderCursor
(
cursor
);
return
!
(
tk
.
isComment
()
||
tk
.
isLiteral
());
if
(
tk
.
isComment
()
||
tk
.
isLiteral
())
if
(
tk
.
end
()
>
cursor
.
position
()
-
cursor
.
block
().
position
())
return
false
;
return
true
;
}
void
CPPEditor
::
indentInsertedText
(
const
QTextCursor
&
tc
)
...
...
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