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 201119 - Curly Braces Auto-Indent breaks If Autocomplete is Off
Summary: Curly Braces Auto-Indent breaks If Autocomplete is Off
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 08:42 UTC by Granthan
Modified: 2011-11-16 16:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Granthan 2011-08-19 08:42:40 UTC
I like to have a newline for the curly braces as follows:

if(....)
{
[Indent]code...
}

I changed the settings in Tools|Options|Editor|Formatting|Language:Php, Category:Braces   to all newline. The preview looks how I want it.

However when I have Tools|Options|Editor|Code Completion|Insert Closing Brackets Automatically turned off, the auto-indention of the curly braces breaks.

If I type:

if(...)[Enter]{[Enter][Enter]}

I get:

if(...)
[Indent]{
[Indent]
[Indent]}

However, if I have auto-completion turned ON and type:

if(...)[Enter]{[Enter]

I get the correct output of:

if(....)
{
[Indent]
}
Comment 1 Granthan 2011-08-19 08:59:12 UTC
I found the bug was becuase of my value set for the right margin. I hadn't liked seeing it so I set it to 0 as one person's suggestion. I now have it set to a large number. The indents work correctly now. Sorry for the hasty bug commit.