Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-26 22:50:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-26 22:50:38 +0400
commit230d66796b36917992348939b3dad85ee32afdec (patch)
tree16e68a8f60f8a3a9eaf2c32586b5560cfb25ac72 /source/blender/blenkernel/intern/text.c
parentc0898bbf48ecf7c9260489d93c37f6f4fbd7b71d (diff)
[#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.
Diffstat (limited to 'source/blender/blenkernel/intern/text.c')
-rw-r--r--source/blender/blenkernel/intern/text.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index e8328d0e622..71c5963c52b 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -2689,7 +2689,7 @@ int setcurr_tab (Text *text)
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 @@ int setcurr_tab (Text *text)
}
}
- 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))