Author Topic: [27.0.1] Adaptive formatting fails to use tabs  (Read 792 times)

jc44

  • Senior Community Member
  • Posts: 329
  • Hero Points: 22
[27.0.1] Adaptive formatting fails to use tabs
« on: January 25, 2023, 12:18:55 PM »
[Win11 x64 27.0.1 brief] Adaptive formatting seems to have forgotten how to use tabs in C. With a kernel file like the one attached SE happily indents with spaces and it seems to get case indent wrong too despite both being correct in adaptive-stats @ 100%. (Tab indent should also be 8 rather than 4 but thats much harder to guess.)

To reproduce have indent with spaces & indent case from switch set as defaults, load the attached file, go to line132 (should be a case statement) <num+><insert> to copy the line (brief emulation) and it turns up indented too far using spaces rather than tabs.

This isn't new with 27.0.1 it applies to all 27.x, but I've just gone back to working on hard-tab files so its annoyed me enough to winge. (Adaptive formatting seems to be one of the things that rots on regular basis - we've had releases where it is almost perfect then after a while it isn't anymore.)

jc44

  • Senior Community Member
  • Posts: 329
  • Hero Points: 22
Re: [27.0.1] Adaptive formatting fails to use tabs
« Reply #1 on: January 25, 2023, 12:33:36 PM »
As is always the way - I've just found that, for reasons unknown, the adaptive formatting affects tabs box had become unchecked so that fixes that problem (sorry to waste your time), the case indented too far on paste thing is still real though.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: [27.0.1] Adaptive formatting fails to use tabs
« Reply #2 on: January 26, 2023, 01:11:31 AM »
I couldn't reproduce the case paste problem you are seeing. Please post your user.cfg.xml. Maybe it's caused by a configuration option.

jc44

  • Senior Community Member
  • Posts: 329
  • Hero Points: 22
Re: [27.0.1] Adaptive formatting fails to use tabs
« Reply #3 on: January 26, 2023, 10:17:41 AM »
Here you go. I've swapped the default C formatting style since the original report s.t. tabs are set at "1 9" as having a default of "1 5" and document of "1 9" seemed to confuse smart indenting generally, but the simple copy/paste gets case indent wrong persists.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: [27.0.1] Adaptive formatting fails to use tabs
« Reply #4 on: January 26, 2023, 05:49:39 PM »
I added a hot fix for this.

jc44

  • Senior Community Member
  • Posts: 329
  • Hero Points: 22
Re: [27.0.1] Adaptive formatting fails to use tabs
« Reply #5 on: January 26, 2023, 05:57:22 PM »
Thanks - I assume from the fact you created a hotfix that you could reproduce it

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: [27.0.1] Adaptive formatting fails to use tabs
« Reply #6 on: January 26, 2023, 06:06:58 PM »
Yes. Adaptive formatting has to be on to get this problem. There’s a very subtle bug in the scanner which leaves SlickEdit in a potentially confused state.