[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36983] trunk/blender/source/blender/ blenkernel/intern/text.c: Fix #27505: Text Editor always indent next line when a " is found ( which is not always correct)
Sergey Sharybin
g.ulairi at gmail.com
Sat May 28 16:40:43 CEST 2011
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;
}
}
More information about the Bf-blender-cvs
mailing list