Jump to content
Ian Branch

Possible formatting bug in D11.3??

Recommended Posts

Hi Team,

My Formatter setting for Line Breaks in 'Line breaks in Var and Const sections' is set to As is.

I like to format like this..

  //
  var sAppVersList: string;
  var aAppPath := ExtractFileDir(ParamStr(0));
  var aFileNames := TDirectory.GetFiles(aAppPath, '*.exe');
  var sFileName: string;
  //

If I now run the Delphi 'Format Project Sources', I get the following..

  //
  var sAppVersList: string;
  var
  aAppPath := ExtractFileDir(ParamStr(0));
  var
  aFileNames := TDirectory.GetFiles(aAppPath, '*.exe');
  var sFileName: string;
    //

Is this a bug or have I missed something??

It only happens where values are assigned to the var.

 

Regards & TIA,

Ian

Edited by Ian Branch

Share this post


Link to post

Ummm.  Sorry, no.  Where is this referred to pls?

In any case I would contend that what I have should be OK.  🙂

Edited by Ian Branch

Share this post


Link to post

the RAD use some templates to Code Editor like CSS format, you can see on ObjRepo on RAD... then, I think that u can customize it, but it's not documented at all.

I has tryed to customize help insight but just for tests...

Share this post


Link to post

K.  Tks.  Maybe I will submit it as a suggestion/enhancement.  Although I still think it is a bug. 😉

Share this post


Link to post

I think that it was always that way for me!

 

var...  Ctrl+D

.... xxxxx // inline way

Edited by programmerdelphi2k

Share this post


Link to post

It's only become an 'issue' since the introduction of inline assignable variables.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×