Author Topic: Remove trailing whitespace not working  (Read 164 times)

TKasparek

  • Senior Community Member
  • Posts: 230
  • Hero Points: 27
Remove trailing whitespace not working
« on: January 07, 2020, 06:12:30 pm »
My C/C++ formatting profile has Remove trailing whitespace turned on but it does not seem to be working.

Making a change to and saving again did not clear it up either. Toggling End on the lines shows the whitespace is still there as well.

Anyone else noticing this?

Code: [Select]
SlickEdit Pro 2019 (v24.0.1.0 64-bit)

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

Build Date: December 19, 2019
Emulation: CUA

OS: Windows 10 x64
OS Version: 10.00.0 
Memory: 38% Load, 12645MB/32442MB Physical, 28041MB/37306MB Page File, 5627MB/134217727MB Virtual
Shell Information: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080, 1080 x 1920, 1080 x 1920

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

Installation Directory: C:\Program Files\SlickEdit Pro 24.0.1\ (non-removable drive,NTFS,322820MB free)
Configuration Directory: C:\Users\thomas.kasparek\Documents\My SlickEdit Config\24.0.1\ (non-removable drive,NTFS,322820MB free)

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1210
  • Hero Points: 117
Re: Remove trailing whitespace not working
« Reply #1 on: January 08, 2020, 04:49:35 pm »
The setting in the formatting profile only takes effect during beautification - so when you run a beautify manually Or, depending on your other setting, beautifies can also happen on things that are pasted, while you're typing, etc...  We have had bugs in the past where trailing spaces would not be trimmed for a beautify, and if that's the case here, we'd need a code snippet that reproduces it, as this sort of bug is very context specific.

If you just want trailing spaces to be removed when the file is saved, you'd need to go to the Options dialog, go to File Options -> Save, and change the "Strip trailing spaces" setting.

TKasparek

  • Senior Community Member
  • Posts: 230
  • Hero Points: 27
Re: Remove trailing whitespace not working
« Reply #2 on: January 08, 2020, 05:24:30 pm »
Ah, that would explain why my search for whitespace didn't find it. I went through and redid my entire config recently, must have missed copying that section. Thanks.