Example
unit Unit1;
interface
type
TSampleClass = class(TObject)
procedure thisisaverylongfunctionnametoshowaproblemwithlinewarpping_12345678910111213(); virtual;
end;
implementation
end.
Formatted once:
procedure thisisaverylongfunctionnametoshowaproblemwithlinewarpping_12345678910111213();
virtual;
Formattet twice
procedure thisisaverylongfunctionnametoshowaproblemwithlinewarpping_12345678910111213();
virtual;
I would expect the same result, if the file gets formatted multiple times. (Use Case: automatic calling the formatter before commiting files or calling in a pipeline job)
I just tried this and it works as expected. Maybe there are other formatter settings involved? Please export your formatter settings to an INI file and attach it to this bug report. This can be done using the "Tools >" button in the formatter's configuration dialog.
Here is the current configuration and an gif which shows the behavior
Im using Version 1.3.22 Build 4008
Last edit: pustekuchen 2024-02-21
Thanks.
After importing your configuration I can reproduce the bug, so there was some other setting involved. Unfortunately your configuration differ greatly from mine which makes it difficult to find which particular combination of settings causes the problem.
It also happens with this simple procedure declaration:
no class required.
Last edit: Thomas Mueller 2024-02-21
It's possibly related to the problem with multi line function directives (2 existing test cases in unit tests which currently fail). But these also fail with my own configuration.
I was mistaken: Regardless of which other settings are active, I can now reproduce it simply by formatting:
and see the spaces in front of cdecl disappear.
The Wrap log lines setting is only necessary to produce this line from one where the function directive is located after the function declaration.
Last edit: Thomas Mueller 2024-02-23
added test case for unit tests in revision #4216
Fixed in revision #4219
Version 1.3.25 build 4298
Problem still exists. After run the formatter twice, spaces are removed in the 2nd line.
Last edit: pustekuchen 2024-12-16