auto formatting inserts tabs where not needed

Bug #427546 reported by Adriaan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
monodevelop (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: monodevelop

running on trunk beta 1:
auto formatting is going wrong sometimes. i have kind of vs.net formatting: all curly braces precede with a return.
Create a new file with the following text. Now replace xxxx by } which results in the code below the ======. there u see too much tabs inserted.

namespace X
{
 public sealed class Cache
 {

  #region general

  public enum Mode : short
  {
   Static
  }

  /// <summary>
  /// Returns the unique key for that mode
  /// </summary>
  private static string CacheKey(Mode mode)
  {
   if (mode == Mode.Static)
    return "";

   xxxx

  }
 }
}

===================== after inserting }

namespace X
{
 public sealed class Cache
 {

  #region general

  public enum Mode : short
  {
   Static
  }

  /// <summary>
  /// Returns the unique key for that mode
  /// </summary>
  private static string CacheKey (Mode mode)
   {
    if (mode == Mode.Static)
     return "";

  }

  }
 }
}

Revision history for this message
Adriaan (adriaanvk) wrote :

remark: i also had 'smart' indentation turned on.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.