Bug 4253 - v2.8.8.4 - c# code formatting "Convert tabs to spaces" corrupts files
Summary: v2.8.8.4 - c# code formatting "Convert tabs to spaces" corrupts files
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-04-05 04:09 UTC by Joseph Hanna
Modified: 2012-04-05 04:35 UTC (History)
1 user (show)

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

Screenshots with before/after shots of code corruption. (149.35 KB, application/pdf)
2012-04-05 04:09 UTC, Joseph Hanna

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 Joseph Hanna 2012-04-05 04:09:13 UTC
Created attachment 1623 [details]
Screenshots with before/after shots of code corruption.

I have repeated this bug on two different machines using MonoDevelop to develop MonoTouch applications.

I set my C# source code formatting to use these rules:-

* Disable "Use default settings from Text File"
* Desired file width = 150 columns
* Tab width = 2 spaces
* Convert tabs to spaces = YES
* Format document on save = YES


Once the settings have been changed, in particular "Convert tabs to spaces" and some code is edited by pressing RETURN, the code is then corrupted and the lines are scrambled.  It is very difficult to describe what the result is other than is splits lines and inter-twines them.  If I restore the "Convert tabs to spaces" setting back to "NO", then the problem goes away. 

Please see the attachment for before and after screenshots.

It has been working well all week up until I upgraded to yesterday.  I cannot tell you what version I had before the upgrade.

Comment 1 Mike Krüger 2012-04-05 04:35:31 UTC
It's fixed in master.