[Lazarus] How to change default editor font *before* primary config ~/.lazarus is created?
Bernd
prof7bit at gmail.com
Tue Oct 16 12:50:20 CEST 2012
2012/10/16 Bernd <prof7bit at gmail.com>:
> Yes it is copied, one can see this when halting execution in the
> constructor of TEditorOptions but when continuing to run some
> milliseconds later it is overwritten with an almost empty default
> file. Tested with 1.0.2 and 1.0.3 from yesterday.
I have tried to debug it last night to find the reason for this
behavior until my eyes hurt, I could not find it. Then as a desperate
workaround I patched main.pp right after the command line options are
parsed and then it started working as expected. But this is *not a
fix*, its only a dirty workaround:
--- ide/main.pp.orig 2012-10-15 23:22:20.000000000 +0200
+++ ide/main.pp 2012-10-15 23:32:02.000000000 +0200
@@ -1291,6 +1291,9 @@
DebugLn('TMainIDE.ParseCmdLineOptions:');
Debugln(' PrimaryConfigPath="',UTF8ToConsole(GetPrimaryConfigPath),'"');
Debugln(' SecondaryConfigPath="',UTF8ToConsole(GetSecondaryConfigPath),'"');
+
+ DebugLn('work around bug: copy editor options template early');
+ LazConf.CopySecondaryConfigFile('editoroptions.xml');
end;
procedure TMainIDE.LoadGlobalOptions;
More information about the Lazarus
mailing list