From 628a8151daa713592f03221571a230c55ba535a9 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 28 May 2011 14:40:42 +0000 Subject: 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.. --- source/blender/blenkernel/intern/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 578b2d57e94..c9862ec3ede 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2759,7 +2759,7 @@ int setcurr_tab_spaces (Text *text, int space) break; } else if (ch==':') { is_indent = 1; - } else if (ch==']' || ch=='}' || ch=='"' || ch=='\'') { + } else if (ch!=' ' && ch!='\t') { is_indent = 0; } } -- cgit v1.2.3