Page 1 of 1

Sync Scroll questions

Posted: 07 Feb 2018 22:39
by JLoftus
I've been using XY for about 4 years now, and I am continually learning new things about it.

Recently, while searching for a particular use case, of course I found XY already answered the mail. I began using Sync Scroll and other sync functions extensively.

Two things that are either bugs, or missing features, or, maybe I just don't know how to accomplish:

First, it seems if I close XY (with save settings on exit enabled) with Sync Scroll enabled, the Sync Scroll does not appear to be active when I restart. Is this true? If it's supposed to "stick", what am I missing?
Second, bigger problem [for me], is that if Sync Scroll has become disabled, and the panes are no longer synced to the same line number, there does not seem to be a way to manually set them to the same line number. Example, if I have 1000 entries in a folder, and in the right pane I am on line number 444, but the left pane is now at 333, is it possible to "instruct" the left pane to to go to the same line number that the right pane is focused to?

I regularly work with dual pane, and multiple tabs in both panes. Often, I will return to the intended "Sync Scroll" view, but the line numbers are off. I would like to easily set them both to the same line number. I suspect this can be done, but I can't find how. If it cannot be [yet] done, @Don, is this something you might implement?

Thanks!

Re: Sync Scroll questions

Posted: 07 Feb 2018 23:02
by highend
If it's supposed to "stick", what am I missing?
Nothing. It is not stored between sessions. The help file explicitly states that...
I would like to easily set them both to the same line number

Code: Select all

    $iPPos = get("FocusedPos", "i");
    focus "PI";
    sel -1, , 1;
    sel $iPPos;
    focus "PI";
    sel -1, , 1;
    sel $iPPos;

Re: Sync Scroll questions

Posted: 07 Feb 2018 23:39
by jupe
JLoftus wrote:First, it seems if I close XY (with save settings on exit enabled) with Sync Scroll enabled, the Sync Scroll does not appear to be active when I restart. Is this true? If it's supposed to "stick", what am I missing?

If you are interested, as a workaround that should work you could change your startup shortcut to:

Code: Select all

C:\Tools\XYplorer\XYplorer.exe /script="::#813;"
obviously you would need to change the path to match your system or just add the last part to your current shortcut, but this should enable sync scroll on startup, at least when launched from that shortcut.

Re: Sync Scroll questions

Posted: 08 Feb 2018 03:22
by JLoftus
Thank you both! This community is amazing. Very much appreciate the helpful answers.

Re: Sync Scroll questions

Posted: 09 Feb 2018 13:40
by JLoftus
@highend The snippet you provided, as always, works like a charm! Thank you again!