diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-16 08:43:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-16 08:43:37 +0400 |
commit | fe83dc68828b70b0f7feeb82f341c505ac6d7c73 (patch) | |
tree | 1c84334085985912f07e318fade6a701a05d2fe5 /source/blender/blenkernel/intern | |
parent | 665ea6b1161921333dddc5cc6d821fa2cac1253c (diff) |
dont add identifiers starting with digits to autocomplete
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index c337e339ebf..a0f611a5a7b 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2930,6 +2930,16 @@ int text_check_identifier(const char ch) return 0; } +int text_check_identifier_nodigit(const char ch) +{ + if (ch <= '9') return 0; + if (ch < 'A') return 0; + if (ch <= 'Z' || ch == '_') return 1; + if (ch < 'a') return 0; + if (ch <= 'z') return 1; + return 0; +} + int text_check_whitespace(const char ch) { if (ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n') |