diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-31 18:49:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-31 18:49:27 +0400 |
commit | acc05db50faa7323e32bab988b2f28e1bb05bc51 (patch) | |
tree | b0011d670f778c243ff81cf7d455ef298b1b0233 /source/blender/blenkernel/intern/suggestions.c | |
parent | 334ca1d344123f4d8f54c16cf93dab9f2fdae88f (diff) |
minor updates to text autocomplete api
- draw function wasn't lining up correctly since DPI edits
- rename text_python.c to text_autocomplete.c
Diffstat (limited to 'source/blender/blenkernel/intern/suggestions.c')
-rw-r--r-- | source/blender/blenkernel/intern/suggestions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c index ff9774f85af..6f9736df683 100644 --- a/source/blender/blenkernel/intern/suggestions.c +++ b/source/blender/blenkernel/intern/suggestions.c @@ -163,13 +163,13 @@ void texttool_suggest_add(const char *name, char type) suggestions.top = 0; } -void texttool_suggest_prefix(const char *prefix) +void texttool_suggest_prefix(const char *prefix, const int prefix_len) { SuggItem *match, *first, *last; - int cmp, len = strlen(prefix), top = 0; + int cmp, top = 0; if (!suggestions.first) return; - if (len == 0) { + if (prefix_len == 0) { suggestions.selected = suggestions.firstmatch = suggestions.first; suggestions.lastmatch = suggestions.last; return; @@ -177,7 +177,7 @@ void texttool_suggest_prefix(const char *prefix) first = last = NULL; for (match = suggestions.first; match; match = match->next) { - cmp = txttl_cmp(prefix, match->name, len); + cmp = txttl_cmp(prefix, match->name, prefix_len); if (cmp == 0) { if (!first) { first = match; |