Author: fejj
Date: 2007-03-07 15:04:35 -0500 (Wed, 07 Mar 2007)
New Revision: 73905

Modified:
   trunk/monodevelop/Extras/CSharpBinding/ChangeLog
   
trunk/monodevelop/Extras/CSharpBinding/FormattingStrategy/CSharpIndentEngine.cs
Log:
2007-03-07  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        (PushNewLine): Properly handle multi-line array assignments.



Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog    2007-03-07 19:49:45 UTC 
(rev 73904)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog    2007-03-07 20:04:35 UTC 
(rev 73905)
@@ -3,6 +3,7 @@
        * FormattingStrategy/CSharpIndentEngine.cs (PushHash): Doh, how
        did I overlook this method when integrating my IndentEngine into
        MD?
+       (PushNewLine): Properly handle multi-line array assignments.
 
        Fix for making "default :" (as opposed to "default:") inside a
        switch-statement work as it should, lwsp is not significant here.

Modified: 
trunk/monodevelop/Extras/CSharpBinding/FormattingStrategy/CSharpIndentEngine.cs
===================================================================
--- 
trunk/monodevelop/Extras/CSharpBinding/FormattingStrategy/CSharpIndentEngine.cs 
    2007-03-07 19:49:45 UTC (rev 73904)
+++ 
trunk/monodevelop/Extras/CSharpBinding/FormattingStrategy/CSharpIndentEngine.cs 
    2007-03-07 20:04:35 UTC (rev 73905)
@@ -198,6 +198,7 @@
                                "if",
                                "base",
                                "this",
+                               "="
                        };
                        
                        for (int i = 0; i < keywords.Length; i++) {
@@ -561,10 +562,6 @@
                        default:
                                // Empty, FoldedStatement, and Block
                                
-                               // if no text entered on this line, nothing to 
do
-                               if (lastNonLwsp == -1)
-                                       break;
-                               
                                switch (lc) {
                                case '\0':
                                        // nothing entered on this line
@@ -611,7 +608,9 @@
                                                        break;
                                                }
                                                
-                                               if (stack.PeekKeyword (0) == 
"struct" || stack.PeekKeyword (0) == "enum") {
+                                               if (stack.PeekKeyword (0) == 
"struct" ||
+                                                   stack.PeekKeyword (0) == 
"enum" ||
+                                                   stack.PeekKeyword (0) == 
"=") {
                                                        // just variable/value 
declarations
                                                        break;
                                                }
@@ -660,7 +659,7 @@
                        needsReindent = false;
                        
                        if ((inside & (Inside.PreProcessor | 
Inside.StringOrChar | Inside.Comment)) == 0 &&
-                           wordStart != -1 && (linebuf.Length - wordStart) > 
1) {
+                           wordStart != -1) {
                                if (Char.IsWhiteSpace (c) || c == '(' || c == 
'{') {
                                        string tmp = WordIsKeyword ();
                                        if (tmp != null)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to