Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369169

Summary: Tab disapear on save
Product: [Tools] CDT Reporter: Charles Briere <charles.briere>
Component: cdt-editorAssignee: Project Inbox <cdt-editor-inbox>
Status: RESOLVED INVALID QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: minor    
Priority: P3 CC: cdtdoug, malaperle
Version: 8.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Charles Briere CLA 2012-01-19 23:16:41 EST
Build Identifier: M20110909-1335

When adding a tab on a newline, it disapear when you save. This is kind of annoying even if not a real issue.

Reproducible: Always

Steps to Reproduce:
1. Create an empty main
2. Move the cursor into the bracket
3. Add a tab if none
4. Ctrl+S to save
5. Cursor is back on lines first position
Comment 1 Marc-André Laperle CLA 2012-01-19 23:38:44 EST
You can change this behavior in the Preferences, C/C++, Editor, Save Actions, untick 'Remove trailing whitespace'.
Comment 2 Charles Briere CLA 2012-01-20 21:27:08 EST
(In reply to comment #1)
> You can change this behavior in the Preferences, C/C++, Editor, Save Actions,
> untick 'Remove trailing whitespace'.

I did not know about this feature but now, it seems pretty cool. Even then, I still believe that this beahaviour for first tab of a function might be changed (or extra option). It could worth considering it for people who save their file after each line they type ...