> But you invoked it on __the line__ where the symbol was defined already, so
> it swapped to the other search. If you invoked it on the call of that
> function, it would behave the way you expected. [my highlighting]
The behaviour and your discussion is predicated on there being __one__
declaration and __one__ definition, "... the line ...". But its not "the" line
it is several lines, for both declaration and definition. This is common in
C++ and as @kugel- noted in another issue, its possible even in C when he had
several versions of the same file open.
> And as @kugel-, I also use the Ctrl+click version of this feature.
The described behaviour is appropriate for ctrl+click where the user is not
specifying which they want to see, then the sequence:
```
`call`->`declarations`->`definitions`-|
^__________________|
```
does make some sense. But not for ctrl+t or ctrl+shift+t which specify goto
declaration or goto definition.
> This behavior isn't anything new and dates back to
> https://github.com/geany/geany/commit/c61a189c00fca689f6f047c7d9c108a807aa14d9
Yeah, I wasn't intending to say it was part of #3547 just that was when I
noticed it.
> I kind of like how it behaves as when you already are on the definition, you
> don't really need to get to the definition again but rather to the
> declaration.
There is that "the" again :-)
If there are several definitions, and I am on "the wrong" one when I type
ctrl+shift+t I want the list of definitions so I can select "the right" one,
not to have to cycle to the declarations then back to definitions.
Essentially the problem is with ctrl+t and ctrl+shift+t doing the same as
ctrl+click does, there is no point in having three actions all doing the same
thing. If an action is titled "goto declaration" thats all it should do, even
if its on a declaration, and similarly the action titled "goto definition"
should do that only, even if its on a definition or a call.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3585#issuecomment-1755507524
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3585/[email protected]>