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 169173

Summary: Indentation is lost on empty lines after saving file
Product: editor Reporter: markeb <markeb>
Component: Formatting & IndentationAssignee: mslama <mslama>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:

Description markeb 2009-07-25 20:42:00 UTC
I am experiencing what I feel is a very annoying and relatively major issue.

NOTE: I am using PHP, so I am not entirely sure if this is a global editor problem or a problem with the PHP editor. I
would imagine it should be fixed everywhere if it is a global editor problem.

Every time I save a file, the indent is lost on empty lines.

(NOTE: If I open a file that was never previously edited with NetBeans, when I save my changes to that file within
NetBeans, it seems like NetBeans will maintain the indent on empty lines that I did not type/modify within NetBeans...
Very weird.)

Take the following new file example:

class Class1
{
	function func1()
	{
|  <=== Indent here is gone!
	}
|  <=== Indent here is gone!
	function func2()
	{
		|  <=== Indent here stayed because my cursor was here when I saved the file.
	}
}

Please note that I am NOT using the Source > Remove Trailing Space command at all.

Thanks.
Comment 1 Jiri Prox 2009-07-27 10:22:26 UTC

*** This issue has been marked as a duplicate of 157561 ***