Disable scroll synchronisation in dual pane mode

Make a request or discuss new features.
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Disable scroll synchronisation in dual pane mode

Post by inspector71 »

Not sure why this is seemingly a default and it's jarring the way it works now.

However, if I clone a file into a secondary pane, it's invariably because I want to copy similar code to a similar function, changing small pieces.

To avoid inconsistencies, I want to see the function I'm largely replicating on one side of the screen, the space I want to replicate it into on the other.

Unfortunately the moment I activate the other pane (whichever left to right, right to left) the bloody file is blink adjusted to where I was on the previous side!!!

Maybe this is a conflict with always scroll on the document under the mouse?

Image

Nope.

Maybe it's because I'm "cloning" and therefore that's the expected behaviour (in which case I cannot really see the benefit of the cloning feature)?

Alas, I cannot see a way to just 'Open' (rather than 'Clone' and perhaps then presumably sync scroll position), as when I try this, the editor recognises the existing file tab open on the 'other' side, rather than opening a mirror (even read only would do me fine, in case there's file system issues) of the file in the opposite pane.

An option to avoid this synchronisation between the same file Cloned into a secondary pane, would be great.
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Disable scroll synchronisation in dual pane mode

Post by pjj »

Just a wild guess: do you have perchance "Use synchronized scroll" (icon on the main toolbar) set on? Because otherwise I can't get the cloned document scroll along the main one.

(If you don't see this icon on your main toolbar, right-click on it and chose "Customize", then scroll down.)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: Disable scroll synchronisation in dual pane mode

Post by inspector71 »

pjj wrote: 10 Sep 2022 08:42 Just a wild guess: do you have perchance "Use synchronized scroll" (icon on the main toolbar) set on?
Love your use of the word "perchance" :) The innernetwebmails seem(ed|s) to dumb down language and I enjoy every use of words I've therefore not heard for some time :)

I'm not aware of such a button, so unlikely to have toggled it intentionally. I did search the preferences and tried to use Ctrl + H to search for "sync" but nothing. Let me take a looksee ... (there's always room for colloquialisms and cute fun in language :) )
pjj wrote: 10 Sep 2022 08:42 Because otherwise I can't get the cloned document scroll along the main one.

(If you don't see this icon on your main toolbar, right-click on it and chose "Customize", then scroll down.)
Image

Not on the toolbar.

Added it but, and I empathise when trying to debug something highlights another bug ... it's not fun, but I cannot determine if it's activated or not in this theme or the "Windows" theme. Expected an inset look with a full colour background.

Image

However, I'm still betting it was off.

Perhaps best if I clarify:

I was not so much experiencing synchronised scrolling in that when I scroll one pane, the other moves exactly the same.

Instead, when I click out of one pane, into the other, the cursor line / scroll position is synchronised with the pane I came from. Which in some sort of context / use case, might actually be helpful. But not in mine.

This makes me wonder if it's not so much strictly a scroll position issue as maybe a document/tab/file focus issue perhaps related to how RJTE implements state management? Would be kinda ironic that RJTE doesn't seem to remember fold status, let alone line and cursor position, between reloads of the file or restarts ... but does that sort of functionality fine when focusing a pane? :)

(Yep, that's another reference to a different bug within bug clarification ... sorry!)
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: Disable scroll synchronisation in dual pane mode

Post by Rickard Johansson »

I'm having trouble replicate this as well.

But, considering how much you like folding - maybe that is why you see a behavior we don't.

If I close some folds, switch pane, open a fold, switch pane again - this may confuse the editor to first open the fold and then place the cursor (which ends up on the wrong line).
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: Disable scroll synchronisation in dual pane mode

Post by inspector71 »

Rickard Johansson wrote: 10 Sep 2022 10:58 I'm having trouble replicate this as well.

But, considering how much you like folding - maybe that is why you see a behavior we don't.

If I close some folds, switch pane, open a fold, switch pane again - this may confuse the editor to first open the fold and then place the cursor (which ends up on the wrong line).
Oooh, I sure do love my folds :) Had another bug lined up but it might be an intermittent one.

You don't use folding much?
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: Disable scroll synchronisation in dual pane mode

Post by Rickard Johansson »

You don't use folding much?
I use the Code Explorer panel to navigate the code. And bookmarks, of course...
I use folding very sparingly 8)
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: Disable scroll synchronisation in dual pane mode

Post by inspector71 »

Rickard Johansson wrote: 10 Sep 2022 14:01
You don't use folding much?
I use the Code Explorer panel to navigate the code. And bookmarks, of course...
I use folding very sparingly 8)
Hmmm, that explains a lot.

I was thinking of starting to use bookmarks more.

Do you think folding will always be a 'third class citizen' in terms of it's refinement compared to those other features?
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Disable scroll synchronisation in dual pane mode

Post by pjj »

inspector71 wrote: 10 Sep 2022 10:29 I'm not aware of such a button, so unlikely to have toggled it intentionally.

Rrright, there's also a main menu entry under "Window".
inspector71 wrote: 10 Sep 2022 10:29 Added it but, and I empathise when trying to debug something highlights another bug ...
Yup, I just found one.

I have cloned PHP file to the right panel, set it for a while to "read only" (probably irrelevant), pressed spacebar to check its behavior, but generally I scrolled fast up ad down the left one, then the right one, clicked here and there... I noticed that the highlighter was switched off for some parts of the left, then the right document, too, so I started to haphazardly reload one or another, and also to change highlighter to random one, then back to the proper one (PHP). All in all, I ended up with corrupted document; luckily, I had a copy on FTP.

I don't have one certain way to replicate it, but when I monkey long enough with reopening "base" or cloned document, I usually end up with highlighter being off (completely switched off, or possibly set for another language), and vertical scrollbar is always repositioned to the top of the document being reloaded (I used quite long [more than 1000 LOC] document). This is not a serious glitch, but maybe it's indicative of something worse (that leads to document corruption)?

This vertical scrollbar going up on document reload can be seen without dual view, too. Several subsequent reloads corrupts the highlighter, too.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: Disable scroll synchronisation in dual pane mode

Post by inspector71 »

pjj wrote: 10 Sep 2022 14:12
inspector71 wrote: 10 Sep 2022 10:29 I'm not aware of such a button, so unlikely to have toggled it intentionally.

Rrright,
Sarcasm detected?
pjj wrote: 10 Sep 2022 14:12 there's also a main menu entry under "Window".
Was not trying to claim ignorance as a defence. Just that if I was not aware of such a button / feature, I would not have regularly (at least deliberately) used it. Hence, it was unlikely to be part of this issue I'm mentioning. Wish I had a more solid memory.

Admittedly the Window menu is not the most conceptually consistently used menu in apps I've used. More often than not it's actually absent these days. But prior to that, ... actually I don't have a great memory of what it tended to hold.

For better and worse, I guess the "View" menu is the menu where I expect to find options to change the way the program is displaying files to me. I guess if that's a per-file context then "Window" is app-wide context, so there's a logical distinction there.
inspector71 wrote: 10 Sep 2022 10:29 Added it but, and I empathise when trying to debug something highlights another bug ...
pjj wrote: 10 Sep 2022 14:12 Yup, I just found one.

I have cloned PHP file to the right panel, set it for a while to "read only" (probably irrelevant), pressed spacebar to check its behavior, but generally I scrolled fast up ad down the left one, then the right one, clicked here and there... I noticed that the highlighter was switched off for some parts of the left, then the right document, too, so I started to haphazardly reload one or another, and also to change highlighter to random one, then back to the proper one (PHP). All in all, I ended up with corrupted document; luckily, I had a copy on FTP.

I don't have one certain way to replicate it, but when I monkey long enough with reopening "base" or cloned document, I usually end up with highlighter being off (completely switched off, or possibly set for another language), and vertical scrollbar is always repositioned to the top of the document being reloaded (I used quite long [more than 1000 LOC] document). This is not a serious glitch, but maybe it's indicative of something worse (that leads to document corruption)?

This vertical scrollbar going up on document reload can be seen without dual view, too. Several subsequent reloads corrupts the highlighter, too.
Sounds like a few possibly similar issues to those I've experienced.

Perhaps Rickard could clarify what "Clone" is intended to do (and maybe not do) so we can give better feedback?

From my viewpoint, I presumed "Clone" meant recreate the current tab/file in the other pane. That would include all state (undo history and so on). From then, the files/tabs, although containing the same document, would be separate. That is ...

1. Edit file in right pane
2. Save file in right pane
3. Switch to left pane

Result: RJTE detects a difference b/w the currently loaded file and the latest on the server/disk, prompts me to either update it or notifies me I will overwrite the changes from the right pane work if I continue to work on the left file.

Admittedly that file change detection b/w disk and the version loaded in the tab may be more difficult or too hard in an sFTP context vs local disk.
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: Disable scroll synchronisation in dual pane mode

Post by Rickard Johansson »

A cloned tab - display the exact same document as the original tab. Only one document exists in memory. So, a clone is not a copy.

It doesn't matter in which view you make changes in. They both display and edit the same document.
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Disable scroll synchronisation in dual pane mode

Post by pjj »

inspector71 wrote: 10 Sep 2022 14:30 Sarcasm detected?
My once favorite aphorist quipped “Sarcasm is the lowest form of wit, but the highest form of intelligence”, but somehow I forgot the second part and tried to shun sarcasm in my life for good. So no, I wasn't mean it to be sarcastic. Sorry, if it sounded so.
inspector71 wrote: 10 Sep 2022 14:30 Was not trying to claim ignorance as a defence.
Actually I was deriding my own ignorance -- I didn't remember about this menu entry, and when on my second machine I noticed there was no "synchronize scroll" icon in the toolbar I thought "hey, this may be it; heck, I'm so clever now and then" :lol:
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: Disable scroll synchronisation in dual pane mode

Post by inspector71 »

pjj wrote: 10 Sep 2022 15:37
inspector71 wrote: 10 Sep 2022 14:30 Sarcasm detected?
My once favorite aphorist quipped “Sarcasm is the lowest form of wit, but the highest form of intelligence”, but somehow I forgot the second part and tried to shun sarcasm in my life for good. So no, I wasn't mean it to be sarcastic. Sorry, if it sounded so.
inspector71 wrote: 10 Sep 2022 14:30 Was not trying to claim ignorance as a defence.
Actually I was deriding my own ignorance -- I didn't remember about this menu entry, and when on my second machine I noticed there was no "synchronize scroll" icon in the toolbar I thought "hey, this may be it; heck, I'm so clever now and then" :lol:
Thanks pjj. For this clarification and your ongoing contributions.

I know how you feel about "clever now and then". A feeling I rarely get but hopefully will again soon, I guess.
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: Disable scroll synchronisation in dual pane mode

Post by inspector71 »

Rickard Johansson wrote: 10 Sep 2022 14:01
You don't use folding much?
I use the Code Explorer panel to navigate the code. And bookmarks, of course...
I use folding very sparingly 8)
Tried to use Code Explorer but it does not seem to do anything for JS files. Was hoping it would pick up all the functions and create a list of (in effect) Go-To links (AKA Favourites?).
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Disable scroll synchronisation in dual pane mode

Post by pjj »

inspector71 wrote: 12 Sep 2022 14:54 Tried to use Code Explorer but it does not seem to do anything for JS files. Was hoping it would pick up all the functions and create a list of (in effect) Go-To links (AKA Favourites?).
To me this looks like a great candidate for a new thread in the "Bugs" board :wink:

Rickard would need a sample code, that won't show anything in your Code Explorer. Can you download e.g. uncompressed jQuery and check it? Does it work for you? It works well for me, apart from the fact that there are many entries marked with big letter N above "Module" entry and I have no idea what they are (it's not explained in the help file). This list can't be searched; perhaps it should go to the middle part of Code Explorer panel, where structures, methods, properties, etc. are listed?
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
crtrubshaw
Posts: 322
Joined: 06 Jun 2012 11:08

Re: Disable scroll synchronisation in dual pane mode

Post by crtrubshaw »

Hi all, interesting thread, I think I understand the issue, but I have a question for Rickard...

Don't you think a clone should refer to a new instance of an object? Therefore, not the same thing and if you change anything on the clone it would not be applied to the original (and vice versa)? There are split view functions (horizontal/vertical) which make more sense to have 2 views of the same document.

Maybe, if it is a clone of the view (not the document), you can only refresh the views when saved?

Just some thoughts.

All the best!
Post Reply