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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user