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
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8.8.4
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-04-05 04:09 UTC by Joseph Hanna
Modified: 2012-04-05 04:35 UTC (History)
1 user (show)

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


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


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 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 2.8.8.4 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 2.8.8.4 yesterday.  I cannot tell you what version I had before the upgrade.

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