From 8f51444869b2367039f9ff89d897978d452d165b Mon Sep 17 00:00:00 2001 From: Martin Date: Sat, 26 Oct 2024 14:39:37 +0200 Subject: [PATCH] IDE, Editor Macro Pascal: fix switching between macros, broken in c77c71b54ece06f8806b13f23418cd48be42432a (cherry picked from commit 81f3140a4b8419ae60bd0005242b9e09d609f0fe) --- components/macroscript/emscriptmacro.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/macroscript/emscriptmacro.pas b/components/macroscript/emscriptmacro.pas index 2cc7968b83..bd85351a88 100644 --- a/components/macroscript/emscriptmacro.pas +++ b/components/macroscript/emscriptmacro.pas @@ -307,7 +307,13 @@ begin Exec.LoadDebugData(FCachedCompiledDbg); end else begin - Exec.Cleanup; + if FPrivateExec = nil then begin + if not Exec.LoadData(FCachedCompiled) then // Load the data from the Data string. + exit; + Exec.LoadDebugData(FCachedCompiledDbg); + end + else + Exec.Cleanup; end; Exec.SynEdit := aEditor as TCustomSynEdit;