Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-04

Updating Cursor position on Ctrl+Click code navigation

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Is there a way to tell Lazarus to move the current cursor to the location where I did a Ctrl+Click, then navigate to the new code?

Use case:
I'm navigating huge amounts of code and I find that I scroll in the code (cursor position doesn't change), then see what I want, Ctrl+Click it. I then review the new code, and press Ctrl+H to go back to my previous position. Lazarus now jumps back to last cursor position, not the position I navigated from. So now I need to scroll again (sometimes 100's of lines of code) to find my place.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Martin Frb
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Hi, Is there a way to tell Lazarus to move the current cursor to the location where I did a Ctrl+Click, then navigate to the new code?

Yes there is (now)

In Mouse options advanced, select "text" in the tree-view, then double click "Source Link" in the grid. A Window opens, and you can select "Move Caret"

But it actually goes wrong. Because the jump is executed first. So it takes you back after the jump.
You can see it works, if you jump to another unit, and then use the mouse to go to the previous tab.

I fixed that in trunk (just now), so if you update this will work for you. But there will be no jump point to go back to the original pos. (the one a few 100's of lines away)

Show quoted text 12 lines
Use case: I'm navigating huge amounts of code and I find that I scroll in the code (cursor position doesn't change), then see what I want, Ctrl+Click it. I then review the new code, and press Ctrl+H to go back to my previous position. Lazarus now jumps back to last cursor position, not the position I navigated from. So now I need to scroll again (sometimes 100's of lines of code) to find my place. Regards, - Graeme -

Reply by email