[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30765] trunk/blender/source/blender/ blenkernel/intern/text.c: [#23033] Unindent after continue statement in Text Space [Patch to fix attached]
Campbell Barton
ideasman42 at gmail.com
Mon Jul 26 20:50:38 CEST 2010
Revision: 30765
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30765
Author: campbellbarton
Date: 2010-07-26 20:50:38 +0200 (Mon, 26 Jul 2010)
Log Message:
-----------
[#23033] Unindent after continue statement in Text Space [Patch to fix attached]
from Justin Dailey (dail)
from the tracker
--- snip ---
In the text space after the python commands return, break, pass or yeild and hitting "Enter" for a new line,
it unindents 1 tab. However it does not do this for the continue statement.
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 2010-07-26 18:38:12 UTC (rev 30764)
+++ trunk/blender/source/blender/blenkernel/intern/text.c 2010-07-26 18:50:38 UTC (rev 30765)
@@ -2689,7 +2689,7 @@
int test = 0;
char *word = ":";
char *comm = "#";
- char back_words[4][7] = {"return", "break", "pass", "yield"};
+ static char *back_words[]= {"return", "break", "continue", "pass", "yield", NULL};
if (!text) return 0;
if (!text->curl) return 0;
@@ -2722,9 +2722,9 @@
}
}
- for(test=0; test < 4; test++)
+ for(test=0; back_words[test]; test++)
{
- //if there are these 4 key words then remove a tab because we are done with the block
+ /* if there are these key words then remove a tab because we are done with the block */
if(strstr(text->curl->line, back_words[test]) && i > 0)
{
if(strcspn(text->curl->line, back_words[test]) < strcspn(text->curl->line, comm))
More information about the Bf-blender-cvs
mailing list