Bug 18463 - Indentation does not work when typed statement does not require semicolon
Summary: Indentation does not work when typed statement does not require semicolon
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2014-03-19 11:15 UTC by Marek Safar
Modified: 2014-03-27 07:41 UTC (History)
3 users (show)

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:

Description Marek Safar 2014-03-19 11:15:07 UTC
Comment 1 Ram Chandra 2014-03-19 14:03:56 UTC
I checked this issue and I am able to reproduce this issue

Steps to reproduce:

1. Create an C# console application in "Xamarin Studio".
2. Put the following code in the main() method 
                       bool stillRunning = true;
			while (stillRunning)
				Console.WriteLine("Enter a number.");
				string input = Console.ReadLine();
				int key = Convert.ToInt32(input);

				switch (key)
					case 1:
						// Do something.
						stillRunning = false;

					case 2:
						// Do something.
						stillRunning = false;

				case 3:
					Console.WriteLine ("Test");
						Console.WriteLine("No key selected.");

3. Now write one more case statement in main method the indentation will not work now .

I observer that when I indent the whole code inside the switch statement using  shortcut keys (logo+] ) and write new case statement the indentation is not working. 

Screencast: http://www.screencast.com/t/6DsMDPGpBNm

Environment Info:

Mac 10.8.5
Xamarin Studio: 4.2.3 (build 60)
Xamarin.Android : 4.12.1 (Business Edition)
Comment 2 Mike Krüger 2014-03-21 03:52:39 UTC
Comment 3 Akhilesh kumar 2014-03-27 07:41:16 UTC
I have checked this issue with latest master builds.

With the help of comment 1, on writing one more case statement in main method, now the indentation is working fine. Also after selecting codes and on using Format Document option, it work fine and it formats code correctly. 

Screencast: http://screencast.com/t/QOOHyyzrAE0b

Xamarin Studio
Version 4.2.4 (build 266)

Build Information
Release ID: 402040266
Git revision: 57fa6b7639703775ae1d5c46536e42ab424cb177
Build date: 2014-03-20 12:34:27-04
Xamarin addins: eee141c29724a19529e77b8e743086d95b29f5ba

Hence closing this issue.