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 268428

Summary: code indentation broken when I push a line of code down with [Enter]
Product: editor Reporter: par7133
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log
code before the prb happen
code after the prb happen

Description par7133 2016-10-09 16:11:46 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Linux version 4.7.5-200.fc24.x86_64 running on amd64
Java; VM; Vendor = 1.8.0_101
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.101-b13

Reproducibility: Happens every time

  * I have the following indentation settings for all the languages:
      Expand Tabs to Spaces: yes
      Number of Spaces per indent: 2
      Tab Size: 2
    inherited by all the languages (PHP and Javascript included)
  * I'm in a PHP page with this javascript code (please consider also the number of spaces included):
      function registerUser() {
          method: "POST",
  * When I push the line "        $.ajax({" down with an [Enter] from the beginning of the line, the indentation
    is broken from 8 spaces to 4 spaces.
  * Same result in PHP code
  * Same result in NetBeans 8.1 

  the indentation of the existing line of code get broken to 4 spaces

  the indentation of the line of code should remain unchanged
Comment 1 par7133 2016-10-09 16:11:50 UTC
Created attachment 162407 [details]
IDE log
Comment 2 par7133 2016-10-09 19:12:28 UTC
Created attachment 162415 [details]
code before the prb happen
Comment 3 par7133 2016-10-09 19:13:00 UTC
Created attachment 162416 [details]
code after the prb happen