diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_suggestions.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/suggestions.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index 9b61d9141fb..c36a2d61968 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -75,7 +75,7 @@ short texttool_text_is_active(Text *text); /* Suggestions */ void texttool_suggest_add(const char *name, char type); -void texttool_suggest_prefix(const char *prefix); +void texttool_suggest_prefix(const char *prefix, const int prefix_len); void texttool_suggest_clear(void); SuggItem *texttool_suggest_first(void); SuggItem *texttool_suggest_last(void); 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; |