SlickEdit Community

Archived Read Only Forums => SlickEdit 2017 v22 Beta Discussion => Topic started by: rowbearto on September 11, 2017, 02:20:28 pm

Title: B3: "if" space before opening parenthesis not respected
Post by: rowbearto on September 11, 2017, 02:20:28 pm
I uploaded my configuration and source file to support.slickedit.com under "ifbrace.tar.gz". My configuration and source file are needed to reproduce.

In my C++ formatting, I have the "space before opening parenthesis" set to "On":

Tools->Options->Languages->Application Languages->C/C++->Formatting->Edit->Spacing->Statements->If->Before opening parenthesis->On

See attached picture: space_before_opening_paren.png

In my source file "ifbrace.cc" go to the end of line 78, type <ENTER> and then "if<space>".

After typing the <space> can see that there is no space between the "if" and opening parenthesis, see: "space_before_opening_paren_not_respected.png"

Title: Re: B3: "if" space before opening parenthesis not respected
Post by: patrick on September 11, 2017, 02:51:47 pm
Taking a look at it, thanks for the report.
Title: Re: B3: "if" space before opening parenthesis not respected
Post by: patrick on September 11, 2017, 02:59:28 pm
You have adaptive formatting turned on, and it decided from previous source in the file that there was no space before parenthesis.  You can run the adaptive-format-stats command to get a summary of what adaptive formatting has decided for a particular file.
Title: Re: B3: "if" space before opening parenthesis not respected
Post by: rowbearto on September 11, 2017, 03:35:39 pm
I was able to keep adaptive formatting on, but turn off "no space before parenthesis", so that I can get the space before parenthesis in this case.

Thanks again!
Rob
Title: Re: B3: "if" space before opening parenthesis not respected
Post by: joecar on September 11, 2017, 04:27:46 pm
I was able to keep adaptive formatting on, but turn off "no space before parenthesis", so that I can get the space before parenthesis in this case.

Thanks again!
Rob
How did you do this...?
Title: Re: B3: "if" space before opening parenthesis not respected
Post by: rowbearto on September 11, 2017, 04:32:17 pm
Tools->Options->Languages->Application Languages->C/C++->Adaptive Formatting

The checkbox is located in this screen.