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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-05-28 18:40:42 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-05-28 18:40:42 +0400
commit628a8151daa713592f03221571a230c55ba535a9 (patch)
tree142d8ff4f2f9e1b8ae57fc99bb18f14cbfdf710c
parentce8467ffd3407197b16c267ecee9030079e13a37 (diff)
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..
-rw-r--r--source/blender/blenkernel/intern/text.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}