Author Topic: SmartIndent + Whitesmith formatting  (Read 2096 times)

Offline nightlight

  • Multiple posting newcomer
  • *
  • Posts: 21
SmartIndent + Whitesmith formatting
« on: November 25, 2014, 02:01:26 pm »
I have used C::B 10.5 until upgrading recently to 13.12 (Windows version). It seems that Smart/AutoIndent & Brace Smart Indent do not cooperate any more with Source Formatting, specifically with the Whitesmith format. This is how the sample is supposed to look like:


Code
int Foo(bool isBar)
  {
  if (isBar)
    {
    bar();
    return 1;
    }
  else
    {
    return 0;
    }
  }

In the old CB, as soon as the open brace was typed at indent +2, the closing brace would be appear right below it, with empty line & cursor ready for the block in between.

In the new version, typing the same way, the code ends up looking like this, as if forcing some other source formatting style:

Code
int Foo(bool isBar)
{
  if (isBar)
  {
     bar();
     return 1;
  }
  else
  {
     return 0;
  }
}

I tried various settings on Smart/AutoIndent, Brace SmartIndent  and Source Formatting, but no luck. Has anyone found how to make SmartIndent & braces work for Whitesmith formatting?
« Last Edit: November 25, 2014, 02:19:53 pm by nightlight »

Offline nightlight

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: SmartIndent + Whitesmith formatting
« Reply #1 on: April 17, 2016, 02:52:02 pm »
The problem still persists in CB version 16.01 -- it just won't do Whitesmith source formatting while you type but only if you manually force reformat command of the file. It's unfortunate I "upgraded" from CB 10.5 which formatted in Whitesmith style as you type just fine.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13313
    • Travis build status
Re: SmartIndent + Whitesmith formatting
« Reply #2 on: April 17, 2016, 03:16:58 pm »
I get a reasonable behavior when I disable the smart indent option in the Settings -> Editor -> General.
Can you describe the problem with more details?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]