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

Bug 369257

Summary: Sometimes Tabs are inserted when "insert spaces for tabs" is selected.
Product: [Eclipse Project] Platform Reporter: Eric <ericstob>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, rui.pinheiro
Version: 4.2Keywords: needinfo
Target Milestone: ---   
Hardware: All   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Eric CLA 2012-01-20 11:45:13 EST
Build Identifier: 

When "insert spaces for tabs" is selected,
When the cursor is at the beginning of a line and nothing is selected, it works as expected.  (four spaces are inserted into the document)
When a line of text is selected, and tab is pressed, a tab is inserted into the document.   Expected four spaces.

Reproducible: Always

Steps to Reproduce:
1. Set "insert spaces for tabs" to true.
2. Set "how whitespace characters" to true.
3. In a document, select a line.
4. Hit Tab key

Expected:
spaces are inserted.

Observed:
tabs are inserted.
Comment 1 Dani Megert CLA 2012-01-20 12:50:54 EST
Which editor?
Comment 3 Rui Pinheiro CLA 2017-08-24 01:31:18 EDT
See:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=477158

There are multiple possible settings for "insert spaces for tabs" both general and specific for many languages. It is somewhat confusing and you'll have to search for each language you use and set the flag appropriately.

As an example, in XML files, if you have general setting on, but specific formatting setting for XML off, it will put spaces if tabbing single line, but tabs if tabbing multiple lines. Seems it's a bug still existing at the date.