This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 33738

Summary: "Expand Tabs to Spaces" option is impossible to disable
Product: editor Reporter: pfelenda <pfelenda>
Component: -- Other --Assignee: issues@editor <issues>
Status: VERIFIED INVALID    
Severity: blocker    
Priority: P4    
Version: -S1S-   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description pfelenda 2003-05-19 15:01:21 UTC
How to reproduce :
1) Open Options dialog
2) Change Option
Editing|Editor Settings|Plain Editor|->Indentation
Engine|...
->Expand Tabs to Spaces
(from true to false)

Try type tab in text editor. There is typed
spaces, but
should be typed tab character.
Comment 1 Miloslav Metelka 2003-05-20 08:38:25 UTC
It works in a different way than you think. Typing TAB in the line
indentation area virtually always inserts amount of spaces given by
"Number of spaces per tab". If the "expand tabs to spaces" is false
then the indentation (let's assume indent-column is 20) is composed by
true '\t' characters for (indent-column / "tab size option") i.e. 20 /
8 = 2 so there will be 2 '\t' characters inserted. The rest i.e.  20 %
8 = 4 will be left as spaces i.e. after two '\t' characters there will
be 4 spaces.
Comment 2 pfelenda 2003-06-02 11:11:30 UTC
Ok, it works correctly.
->Verified