News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Find Declaration leaves declaration hidden

Started by k1mgy, November 23, 2005, 03:24:41 AM

Previous topic - Next topic

k1mgy

Find Declaration is nice.  It finds the declaration, but puts the cursor

void incrementError(char *fmt, ...)
{
<-here

and therefore this text:
  void incrementError(char *fmt, ...)
  {
appears beyond the visible area at the top of the viewport.

Note: my formatting convention is
funcname()
{
not
funcname(){

Is this a bug?

MortenMacFly

Quote from: k1mgy on November 23, 2005, 03:24:41 AM
Is this a bug?
I would wonder because I for myself like exactly this. I believe in most cases you want to change something inside the funtion if you are searching for the declaration, not the declaration itself. So if you start inside the function you save 2x "cursor down"... :lol: I guess it's a philosophic question...

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

k1mgy

For me it's a confidence question.  Each time I ask "is this the function"?

MortenMacFly

Quote from: k1mgy on November 23, 2005, 10:59:04 AM
For me it's a confidence question.  Each time I ask "is this the function"?
I see... but how can you be sure if the cursor is just 1 or 2 lines above? It's the same algorithm that would be used, so you have to trust C::B anyway...?!

Morten.

...dropping out.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

k1mgy

It's annoying and yes I can live with it, but am hoping that it can be fixed someday. 

MortenMacFly

Quote from: k1mgy on November 23, 2005, 11:15:08 AM
but am hoping that it can be fixed someday. 
Uuuh, uuuh! *snap*, *snap* While discussion around: Did you try the current CVS version? It seems there it's operating the way you want it to operate... at least on my sources... :)

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot

Hey folks,

just being a purist :

void f(int arg1, , int arg2);

This is the declaration of a function !!!

void f(int arg1, int arg2)
{
  // my superior implementation  ;-)     (ever seen code with a smile displayed in it)
}

This is the definition, so when asking to see the declaration you should see the first flavour.


Anyone tested where the cursor ends up for a declaration like :

void function(
   int arg1,
  int arg2);


Cheers,
Lieven

k1mgy

I installed binaries prepared by Ceniza http://gda.utp.edu.co/~ceniza/CodeBlocks/ and now "find declaration" brings it into focus smack dab in the middle of the viewport, which is just fine.

Killerbot is right (and this nuance slipped by me) the menu is labled "Find Declaration" where it ought to be labeled "Find Definition".  I suppose both might be nice, actually.

Now hoping for that "Return to Origin".

/m

takeshimiya

k1mgy, what you're suggesting, generally speaking is a navigation system with back and forward, just like any internet browser.

Just submit a feature request to the SF tracker.