Bug 13371 - Code formatting removes blank lines before/after #region and #endregion statements
Summary: Code formatting removes blank lines before/after #region and #endregion state...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 4.0.9
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-07-21 22:16 UTC by Joseph Hanna
Modified: 2014-01-09 05:42 UTC (History)
2 users (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:
VERIFIED FIXED

Description Joseph Hanna 2013-07-21 22:16:39 UTC
Description of Problem:


Steps to reproduce the problem:
1. Create #region in text editor. Ensure blank lines before and after #region & #endregion. 
2. From menu, choose Edit --> Format --> Format Document


Actual Results:

Blank lines are stripped out before and after #region and #endregion lines.


Expected Results:

Either:-
1. Preserve the blank lines that are there
2. Provide settings in Preferences pane to specify blank lines before/after these statements.
3. Leave 1 blank line before/after these statement lines


How often does this happen? 
Every time I save (which also formats the document)

Additional Information:
It makes the code hard to read.


Thanks
Comment 1 Mike Krüger 2013-07-22 08:32:50 UTC
Fixed 

I added the option & defaulted to 1 blank line
Comment 2 Joseph Hanna 2013-07-22 17:44:12 UTC
Thanks Mike!  Any idea when this will be released?
Comment 3 Mike Krüger 2013-07-23 01:25:37 UTC
No not really since the fix came too late in the beta cycle - I don't think that we add new options to the next release. Therefore it will take a while :/.
Comment 4 Joseph Hanna 2013-07-23 01:28:21 UTC
Ok - thanks for fixing it anyway.
Comment 5 Atin 2014-01-09 05:42:57 UTC
Today we have checked this issue with:

XS 4.2.3(build 29)
ML 10.8.5

Now this issue is not exist, code formatting not removes blank lines before/after #region and #endregion statements in XS.

Hence marking this as Verified.