[Lazarus] Updating Cursor position on Ctrl+Click code navigation

2015-04-17 Thread 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/

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Updating Cursor position on Ctrl+Click code navigation

2015-04-17 Thread Martin Frb

On 17/04/2015 14:48, 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)




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 -




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Updating Cursor position on Ctrl+Click code navigation

2015-04-17 Thread Graeme Geldenhuys
On 2015-04-17 16:02, Martin Frb wrote:
> I fixed that in trunk (just now), so if you update this will work for 
> you.

Awesome, thank you very much.


Regards,
  - Graeme -

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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus