Recent

Author Topic: Unexpected behavior when defining macros.  (Read 418 times)

440bx

  • Hero Member
  • *****
  • Posts: 5805
Unexpected behavior when defining macros.
« on: June 06, 2025, 11:43:01 am »
Hello,

Renaming a macro does not behave as expected.  Please follow these steps to see the behavior:

1. bring up the "Editor Macros" window
2. select "Create and Edit"  (this will cause a new macro text window to be opened with a "default" name)
3. select the new macro in the "Editor Macros" window
4. select "rename" in the "Editor Macros" and rename the macro to whatever name you want.

Now note that after renaming the macro, the tab in the source editor still has the old macro name.  typing macro source in that window does NOT affect the renamed macro. 

I think that when the macro is renamed, the source editor should mirror the rename action. 

Failure to notice that the renamed macro is not the macro in the source editor can cause an entire macro to be programmed and possibly lose the programming if that window is closed (there is no warning that the code will be lost, it is _not_ present in the renamed macro.)

Comments welcome.

FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11789
  • Debugger - SynEdit - and more
    • wiki
Re: Unexpected behavior when defining macros.
« Reply #1 on: June 06, 2025, 11:52:07 am »
Please report as bug.

440bx

  • Hero Member
  • *****
  • Posts: 5805
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018