R# moves inner regions out

Hi,

I encountered a strange behaviour of R#. When I cleanup the code (Ctrl E+F) it moves inner regions out of my toplevel regions and places them at the end of the file. This only happens when the inner region has more than 1 method. If it only contains one single method R# leaves the region untouched.

Example:

Before Cleanup:

public class Test
    {
        #region  =============== private & protected methods ================

        #region -- blabla

        private bool C()
        {
            return true;
        }

        private bool A()
        {
            return true;
        }

        #endregion


        private string B()
        {
            return "";
        }

        #endregion
        
    }

After cleanup:

public class Test
    {
        #region  =============== private & protected methods ================

        private string B()
        {
            return "";
        }

        #endregion

        #region -- blabla

        private bool C()
        {
            return true;
        }

        private bool A()
        {
            return true;
        }

        #endregion
    }

If region blabla contains only one method R# leaves the region  where it is.

Am I doing something wrong or is this a bug?

Any ideas.
Here my current file layout settings:



 

Thanks

Michael

 

 

 

 

 

1
1 comment
Avatar
Permanently deleted user

Still no solution to this bug.

Even worse, JetBrains try to tell me, after 2 Month, that this behaviour is intended

Unbelievable!!!

0

Please sign in to leave a comment.