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 188135 - Wrong snippets indentation when using tab for indent
Summary: Wrong snippets indentation when using tab for indent
Status: RESOLVED DUPLICATE of bug 187127
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 04:19 UTC by s.seletskiy
Modified: 2010-07-28 06:26 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 s.seletskiy 2010-06-28 04:19:25 UTC
Using tab for indentation cause wrong indentation calculations when inserting snippets, though when spaces are used for indentation all looks good.

Steps to reproduce:
1. create PHP file with contents:
<?php
$a = array(1,
<TAB>2);

2. create snippet with name "i" and with expanding by hitting "TAB":
if($a) {
<TAB>{$cursor}
}

3. type in newly created file, right after all contents in a new line: i<TAB>

Actual results:
<?php
$a = array(1,
<TAB>2);
   if($a) {
<TAB>
}

Expected results:
<?php
$a = array(1,
<TAB>2);
if($a) {
<TAB>
}

Product Version: NetBeans IDE 6.9 (Build 201006101454)

Additional information:
Same bug appears when I trying to insert snippet in context like this:
<?php
class A {
<TAB>public function b{
<TAB><TAB>//insert here
<TAB>}
}

Wrong indentation in some cases can be fixed by pressing alt+shift+f, such as second example, but can't be fixed in first.

When I check "Expand Tabs to Spaces" in "Formatting" tab indentation inserting correctly.
Comment 1 s.seletskiy 2010-07-28 06:26:27 UTC

*** This bug has been marked as a duplicate of bug 187127 ***