Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using Import macro, macros not refreshed when imported file edited #63

Closed
delphidabbler opened this issue May 3, 2023 · 3 comments
Assignees
Labels
bug completed Completed awaiting release.

Comments

@delphidabbler
Copy link
Owner

If an Import macro is used and the content of the imported file is changed then the values of the macros defined in the imported file is not updated. Therefor any .rc file generated after the import file is changed will use the previous value of the macros.

Reproduce

  1. Create an import file named test. Add a macro definition to it: foo=alice.
  2. Create an import macro with name bar that imports test.
  3. Create a .vi file in VIEd and set the Comments string info item to <%bar.foo>
  4. View the RC Statements. It will contain VALUE "Comments", "alice\000"
  5. Now edit foo macro definition in test to read foo=bob.
  6. View the RC Statements again.. It will still have VALUE "Comments", "alice\000" where it should read VALUE "Comments", "bob\000"

Workaround

Change the import file then open the Macro Editor and press OK. The macros are then updated.

Action required

Change the implementation so that macros are re-read just before generating .rc file content.

@delphidabbler delphidabbler self-assigned this May 3, 2023
@delphidabbler delphidabbler added completed Completed awaiting release. and removed accepted labels May 4, 2023
@delphidabbler delphidabbler added this to the next-release milestone May 4, 2023
@delphidabbler
Copy link
Owner Author

Bug also affects External macros

@delphidabbler
Copy link
Owner Author

This problem also occurs when viewing macro values: the values viewed are incorrect if the values in Import or External files have been changed.

@delphidabbler
Copy link
Owner Author

Fixed by merge commit 24b84f0

@delphidabbler delphidabbler removed this from the next-release milestone Jun 2, 2023
@delphidabbler delphidabbler added this to the release-2.15.1 milestone Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug completed Completed awaiting release.
Projects
None yet
Development

No branches or pull requests

1 participant