Bug 59890 - Inserting or sorting usages reformats the whole document
Summary: Inserting or sorting usages reformats the whole document
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding (show other bugs)
Version: Trunk
Hardware: PC Mac OS
: High normal
Target Milestone: 15.6
Assignee: Mike Krüger
URL:
: 60084 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-02 12:54 UTC by Lopatkin Ilja
Modified: 2017-10-10 10:49 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: Yes
Last known good build: 7.3.0.639 (d15-5)


Attachments

Description Lopatkin Ilja 2017-10-02 12:54:40 UTC
This behavior appeared after merge with master-roslyncompletion branch though I'm not really sure if these things are related.
Comment 1 Mike Krüger 2017-10-04 08:46:01 UTC
that branch doesn't change this behavior.

I can't repro it with current master:

https://bugzilla.xamarin.com/show_bug.cgi?id=39274
Comment 2 Matt Ward 2017-10-04 09:15:12 UTC
My repro:

1) Create a C# library.
2) In MyClass.cs reformat it and save the file so it looks like this:

using System.Collections;
using System;
using System.CodeDom;

namespace Test
{
	public class MyClass {
		public MyClass() {
		}
	}
}

3) Right click on the using System.Collections line and select Quick Fixes - Sort and remove usings.

Expected result:

File is not yet saved.
All usings removed
MyClass code not reformatted.

Actual result:

File is not yet saved.
All usings removed.
MyClass code reformatted:

namespace Test
{
	public class MyClass
	{
		public MyClass()
		{
		}
	}
}

Tested with VS Mac 7.4.0.216 (master).

VS Mac 7.3.0.639 (d15-5) will remove all the usings but the code still has the original formatting.


In preferences both Enable on the fly formatting and Format document on save are disabled for me.
Comment 3 David Karlaš 2017-10-10 10:49:25 UTC
*** Bug 60084 has been marked as a duplicate of this bug. ***

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