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
Marco Bubke
flatpak-qt-creator
Commits
3decf8cc
Commit
3decf8cc
authored
May 14, 2010
by
Roberto Raggi
Browse files
Jump to the declaration if the last visible symbol is the current function definition.
parent
25b04ff5
Changes
1
Show whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
3decf8cc
...
...
@@ -1348,9 +1348,13 @@ CPPEditor::Link CPPEditor::findLinkAt(const QTextCursor &cursor,
if
(
Symbol
*
symbol
=
result
.
declaration
())
{
Symbol
*
def
=
0
;
if
(
resolveTarget
)
if
(
resolveTarget
)
{
def
=
findDefinition
(
symbol
,
snapshot
);
if
(
def
==
doc
->
findSymbolAt
(
line
,
column
))
def
=
0
;
// jump to declaration then.
}
link
=
linkToSymbol
(
def
?
def
:
symbol
);
link
.
begin
=
beginOfToken
;
link
.
end
=
endOfToken
;
...
...
Write
Preview
Markdown
is supported
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