This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 42310 - Extra indentation when using Smart indentation with inline List<enum> initialisation
Summary: Extra indentation when using Smart indentation with inline List<enum> initial...
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding (show other bugs)
Version: 6.0.0 (C7)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: (C8)
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2016-07-01 11:42 UTC by John Conners
Modified: 2016-07-12 15:50 UTC (History)
3 users (show)

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


Attachments
Screenshot of code as entered and the incorrect cursor placement (26.70 KB, image/png)
2016-07-01 11:42 UTC, John Conners
Details

Description John Conners 2016-07-01 11:42:49 UTC
Created attachment 16546 [details]
Screenshot of code as entered and the incorrect cursor placement

It's all explained in the screenshot, but basically if you create an inline List<T> where T is an enum, then hitting enter after the comma on one line results in the cursor being too indented to the right - it seems to line up one column to the left of the full stop.

public enum Animal
{
	Cat,
	Dog,
	Pig,
	Elephant,
	Cheetah
};

public class MyClass()
{
	public MyClass()
	{
		var animals = new List<Animal>
		{
			Animal.Cat,
			     |
		};
	}
}

I would expect the cursor to line up with the A of Animal.Cat.
Comment 1 xamarin-release-manager 2016-07-07 08:08:29 UTC
Fixed in version 6.1.0.5133 (master)

Author: Mike Kr??ger
Commit: 655313e7877766b799bd57fd37e9581ca1d4f7dd (mono/monodevelop)
Comment 3 Jatin 2016-07-08 07:21:38 UTC
Environment Info:
https://gist.github.com/Sadik1/c391679eec4aa24079b4072e96e51b5c
Comment 4 Mike Krüger 2016-07-08 11:45:56 UTC
try 6.1.x
Comment 5 Saurabh 2016-07-08 12:57:27 UTC
@Mike Krüger

Again,I have checked this issue with master XS 6.1.0.5090 and getting same issue. This screencast for the same http://www.screencast.com/t/eI7zoRc3AC
Comment 6 Mike Krüger 2016-07-12 15:50:58 UTC
fixed in :  6.1.0.5133

Note You need to log in before you can comment on or make changes to this bug.