Recent

Author Topic: IDE Lazarus 4.0 on Windows --- Is this a bug or I'm missing something?  (Read 864 times)

EganSolo

  • Sr. Member
  • ****
  • Posts: 334
Lazarus 4.0, Build Date: 2025-05-29 14:51, FPC 3.2.2 Revision: lazarus_4_0 running under Windows 11 64 bit

The primary IDE and a second window are open.
I'm editing a file in the second window. I select lines and try to sort them ... nothing happens.
I drag the file to the main IDE window and repeat the operation. The lines are sorted.
It's as if the IDE is getting confused when commands target files in the second window.

Has anyone else experienced this?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11487
  • Debugger - SynEdit - and more
    • wiki
I am guessing:
- Anchordocking?
- one source editor docked to the main window (one window that has main menu and editor)?
- 2nd source editor floating?

Are you using a keycombo to activate the sort? (NOT a keycombo to activate the main menu)
Or a you using the main menu?

Because, if you use the main menu, then you activate that window, and I would expect that moves focus to that window...

If that is the case, then I don't know. One could call it a design flaw, or a bug, or expected behaviour.

If that is Windows (and I guess other OS will have similar), then Windows sends the WM_ACTIVATE message. When a window is activated, it focuses the previously focused focusable-widget it has.


Then I wrote all this, and though I try. And I can select "sort selection" and it always applies to the editor last focused before I click the main menu.

Though that is Windows 10. Maybe Windows 11 differs...
And it is Lazarus 4.1 (the fixes branch). Not sure, have to check if it got any relevant fixes...

But then, I started with a big guess. Maybe your setup is different from that?

EganSolo

  • Sr. Member
  • ****
  • Posts: 334
Hi Martin,

Thanks for the reply.

It worsened: the Code Explorer stopped updating whenever I switched to a file in the second window. So, yes, you guessed my setup. A docked main window and a second, floating one.

I restarted Laz, and the problem went away. I'll keep an eye and see if it reoccurs.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11487
  • Debugger - SynEdit - and more
    • wiki
It could also be the docked form editor. IIRC that has some issue where it affects the selected editor.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39417

dsiders

  • Hero Member
  • *****
  • Posts: 1453
I tested this on Linux + Qt6 + Docked IDE.

If you use "Clone to new Window", the Code Explorer will either take an extremely long time to update or stop responding altogether. If you use "Open in New Window", the problem does not seem to occur.

Strange...

[ Edit ]
Tested on main.
« Last Edit: June 18, 2025, 03:17:50 pm by dsiders »
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11487
  • Debugger - SynEdit - and more
    • wiki
I just checked with 4.1 on Win-10 64bit.

The code explorer does not see to update on "When switching file in source editor".

That applies even to only a single source editor open (of course with multiple files/tabs in that source editor, so they can be switched).

I have not checked if that is to do with any particular layout in the docking (nested pages?).
Nor if it has to do with the docked form editor, or not...


If I set it to update "On Idle" then it will work (updates 1 or 2 seconds after switching tabs)

 

TinyPortal © 2005-2018