Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369257 - Sometimes Tabs are inserted when "insert spaces for tabs" is selected.
Summary: Sometimes Tabs are inserted when "insert spaces for tabs" is selected.
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.2   Edit
Hardware: All Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2012-01-20 11:45 EST by Eric CLA
Modified: 2017-08-24 01:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.