Delphi XE IDE "jump to code" issue

When using the “Jump to function” (can’t remember the name for the CTRL + click) in the Delphi XE IDE, sometimes it opens the correct unit / form, but the cursor is put at entirely the wrong line.

Is this because the unit has had the functions and/or classes manually moved around at some point? Even if I tidy the implementations up to match the order in the interface section, the jump functions don’t always work correctly.

This is often an artifact of mixed line endings. Open the file in an external editor and turn on showing line endings (I used notepad++) and see if that’s the case.

I just downloaded Notepad++ and opened a file that has the issue.

Turning on Show All Characters shows that every line has just the CR LF at the end.

But, I did notice something else. When cleaning up the source, I must have deleted the

{ TClassName }

at the start of one of the classes. Once I restored that, the jump function worked correctly.

1 Like