Bug 2145 - [New resolver] autoformatter unindents previous code block when newlines are added
Summary: [New resolver] autoformatter unindents previous code block when newlines are ...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-11-21 18:26 UTC by Marek Habersack
Modified: 2015-08-20 03:24 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Marek Habersack 2011-11-21 18:26:46 UTC
With following code is in the buffer:

using System;

namespace NameSpace
{
	public class Klass	
	{
		public Klass ()
		{
		} // <- tapping Enter twice after this brace unindents the block
	}
}

inserting the newlines as shown above results in code being reformatted to:

using System;

namespace NameSpace
{
	public class Klass
	{
		public Klass ()
	{
	}


	}
}

Editor is configured to indent with tabs.
Comment 1 Mike Krüger 2012-02-16 04:33:49 UTC
Are you using the newresolver branch ?

It seems to work for me:

http://screencast.com/t/gVfwz9gb4

I've whitespaces turned on, maybe that helps to track that issue. I really hoped to have fixed this behavior in the newresolver branch :/
Comment 2 Mike Krüger 2012-03-06 08:08:24 UTC
Finally fixed that one.