Author Topic: tab settings changing for no apparent reason  (Read 574 times)

davehohl

  • Senior Community Member
  • Posts: 260
  • Hero Points: 20
tab settings changing for no apparent reason
« on: December 02, 2015, 08:33:47 pm »
I have been going crazy today trying to track down a very weird problem. I created a new .c file, and copied and pasted some code from another file into it. Then, after moving to another location and hitting carriage return, all of a sudden the tab spacing went from every 4 to every 12. Even if I manually use Document>Tabs to change it back, the tabs are still screwed up.

I tried deleting my config folder and rebooting my computer, but neither helped.

I have attached two screen shots, showing the tab settings before and after hitting carriage return. I have also attached oscillator.c, which (for me at least) reproduces this problem every time just by clicking anywhere in the file and hitting carriage return. The problem seems to be associated with the statement starting on line 56 of the .c file, since if I leave those lines out things work fine. But pasting just those lines into a file does not cause the problem, so it looks like some sort of interaction between those lines and the context it is in.

Here is my environment info:

SlickEdit Pro 2015 (v20.0.0.12 64-bit)

Serial number: xxxxxxxx
Licensed number of users: Single user
License file: C:\ProgramData\slickedit\20\slickedit.lic

Build Date: November 03, 2015
Emulation: CUA

OS: Windows 8 x64
OS Version: 6.02.9200 
Memory: 27% Load, 6619MB/24455MB Physical, 7069MB/28039MB Page File, 595MB/134217727MB Virtual
Shell Information: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080, 960 x 600, 1920 x 1200

Project Type: Cpp
Language: .c (C/C++)
Encoding: Automatic

Installation Directory: C:\Program Files\SlickEdit Pro 20.0.0\ (non-removable drive,NTFS,345325MB free)
Configuration Directory: C:\Users\David\OneDrive for Business\Documents\My SlickEdit Config\20.0.0\ (non-removable drive,NTFS,345325MB free)
Migrated from: C:\Users\David\OneDrive for Business\Documents\My SlickEdit Config\19.0.2\
Spill File: C:\Users\David\AppData\Local\Temp\$slk.10592 (non-removable drive,NTFS,345325MB free)


davehohl

  • Senior Community Member
  • Posts: 260
  • Hero Points: 20
Re: tab settings changing for no apparent reason
« Reply #1 on: December 02, 2015, 10:31:59 pm »
Some additional info:

If I put an #if 0 ... #endif wrapper around the statement starting on line 56 then things work fine. But as soon as I change the 0 to a 1, hitting return causes the tabs to get messed up.

#if 1
    REFOCON =       _REFOCON_ROON_MASK   // reference oscillator enabled
                +   _REFOCON_ROSSLP_MASK // ref osc runs in sleep mode
                +   (1 << _REFOCON_ROSEL_POSITION) // base clk = primary osc
                +   (0 << _REFOCON_RODIV3_POSITION)// RODIV = no divide
                +   (0 << _REFOCON_RODIV2_POSITION)
                +   (0 << _REFOCON_RODIV1_POSITION)
                +   (0 << _REFOCON_RODIV0_POSITION);
#endif

davehohl

  • Senior Community Member
  • Posts: 260
  • Hero Points: 20
Re: tab settings changing for no apparent reason
« Reply #2 on: December 02, 2015, 10:39:06 pm »
Also, if I just enclose the statement in parentheses things work fine. That's at least an easy workaround for me. But SE is certainly getting confused about something!

davehohl

  • Senior Community Member
  • Posts: 260
  • Hero Points: 20
Re: tab settings changing for no apparent reason
« Reply #3 on: December 11, 2015, 04:46:35 pm »
I filed a support case for this. It turns out the issue has to do with adaptive formatting. Turning it off should work around the problem.