Revision: 36983
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36983
Author:   nazgul
Date:     2011-05-28 14:40:42 +0000 (Sat, 28 May 2011)
Log Message:
-----------
Fix #27505: Text Editor always indent next line when a " is found (which is not 
always correct)

Do not indent if there's any non-space character after colon.

This only makes life a bit easier, but it's still not 100% correct indentation
strategy. For example when colon is inside non-closed string or so.
Also there's not indentation for { and un-indentation for }.

Handling such cases would require much smarter strategy..

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/text.c

Modified: trunk/blender/source/blender/blenkernel/intern/text.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/text.c       2011-05-28 
14:16:56 UTC (rev 36982)
+++ trunk/blender/source/blender/blenkernel/intern/text.c       2011-05-28 
14:40:42 UTC (rev 36983)
@@ -2759,7 +2759,7 @@
                                break;
                        } else if (ch==':') {
                                is_indent = 1;
-                       } else if (ch==']' || ch=='}' || ch=='"' || ch=='\'') {
+                       } else if (ch!=' ' && ch!='\t') {
                                is_indent = 0;
                        }
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to