From 230d66796b36917992348939b3dad85ee32afdec Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Jul 2010 18:50:38 +0000 Subject: [#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. --- source/blender/blenkernel/intern/text.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/text.c') 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)) -- cgit v1.2.3