fix [#34275] Text autocomplete cuts words with accents or special characters

autocomplete is now unicode aware, using python api's checks for now. eventually we should have our own.
This commit is contained in:
2013-02-19 16:13:41 +00:00
parent 91a63e347d
commit 7f1ae2497b
4 changed files with 36 additions and 3 deletions

View File

@@ -928,3 +928,20 @@ static void bpy_module_free(void *UNUSED(mod))
}
#endif
/* EVIL, define text.c functions here... */
extern int text_check_identifier_unicode(const unsigned int ch);
extern int text_check_identifier_nodigit_unicode(const unsigned int ch);
extern int text_check_identifier(const char ch);
extern int text_check_identifier_nodigit(const char ch);
int text_check_identifier_unicode(const unsigned int ch)
{
return (ch < 255 && text_check_identifier((char)ch)) || Py_UNICODE_ISALNUM(ch);
}
int text_check_identifier_nodigit_unicode(const unsigned int ch)
{
return (ch < 255 && text_check_identifier_nodigit((char)ch)) || Py_UNICODE_ISALPHA(ch);
}