Recent

Author Topic: Stop the IDE from syncing editor tabs across two source editors?  (Read 3895 times)

EganSolo

  • Sr. Member
  • ****
  • Posts: 398
My IDE setup when editing includes two source editor windows. I tend to clone a tab across these and find it helpful to look at a piece of code in one editor while working on another piece in another editor. For instance, suppose I have a project with three files, main_form.pas, options.pas and utils.pas

Main editor     : main_form.pas (focused) and options.pas
Second editor : utils.pas (focused) and options.pas

Currently, if I select options.pas in the second editor, the focus in the main editor will switch to options.pas also. I don't want the second editor to change the focus of the main editor to a different file. I looked into tools --> Options and didn't find an obvious box to tick. Suggestions?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12560
  • Debugger - SynEdit - and more
    • wiki
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #1 on: July 25, 2025, 08:32:42 am »
Do you have the docked form editor installed? Which version of Lazarus do you use?

It reminds me off https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39417
But that is believed to be fixed in Lazarus 4...

EganSolo

  • Sr. Member
  • ****
  • Posts: 398
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #2 on: July 25, 2025, 07:25:56 pm »
Hi Martin,
  Yes, that issue appears to be what I'm dealing with.
  I'm using the docked version of Laz 4.0, build date: 2025-05-29.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12560
  • Debugger - SynEdit - and more
    • wiki
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #3 on: July 25, 2025, 07:52:38 pm »
Just noticed, it is only fixed in trunk.

You can try to apply the changes to your installed IDE.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/b6498c7031a2af72b383f65b6368117e5d14f904
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/b6498c7031a2af72b383f65b6368117e5d14f904.diff

When I fixed it I couldn't get any feedback, if
1) it works (probably)
2) it introduces other/new problems

I don't use the docked form editor, so I wont ever notice if it breaks anything else.

So, not knowing if would be safe, I did not merge it into 4.n.

EganSolo

  • Sr. Member
  • ****
  • Posts: 398
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #4 on: July 25, 2025, 08:20:13 pm »
Thanks, Martin,
I've applied the patch and will let you know what my experience is.

EganSolo

  • Sr. Member
  • ****
  • Posts: 398
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #5 on: July 25, 2025, 09:58:47 pm »
Martin,
  So far so good. The weird behavior stopped, and I haven't seen anything untoward. I'll update again after a week. Since I'm in the editor every day with 20+ tabs open, I'll know if something goes wrong.

  After aborting a run, if a tab in the second editor is focused and I press Ctrl+F9, the run button remains disabled after a successful compilation. To enable it, I have to click on the main editor. To stop this behavior, I have to close and reopen the IDE.
« Last Edit: July 25, 2025, 10:03:20 pm by EganSolo »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12560
  • Debugger - SynEdit - and more
    • wiki
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #6 on: July 25, 2025, 10:31:02 pm »
  After aborting a run, if a tab in the second editor is focused and I press Ctrl+F9, the run button remains disabled after a successful compilation. To enable it, I have to click on the main editor. To stop this behavior, I have to close and reopen the IDE.

"aborting a run" means
- stop while compiling
- stop while the app is running (terminate app)
?

1) That was like this BEFORE and AFTER the Patch? Or this has STARTED with the patch?

2) Please report it a as a bug. (Otherwise it might get forgotten)

3) Does it also fix itself if you
- open any menu from the main menu
- select something from the component palette (in case you have it visible)
?

EganSolo

  • Sr. Member
  • ****
  • Posts: 398
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #7 on: July 30, 2025, 01:21:25 am »
It was before and after the patch. So, the patch had no impact.
I'll report it after I figure out a repeatable sequence.
To answer your other questions: Yes, it fixes itself when

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12560
  • Debugger - SynEdit - and more
    • wiki
Re: Stop the IDE from syncing editor tabs across two source editors?
« Reply #8 on: August 08, 2025, 01:51:26 pm »
I merged the current fix for Lazarus 4.4

 

TinyPortal © 2005-2018