Support UTF-8 in TextEdit and LineEdit navigation

This allows jumps over whole non ASCII words with Ctrl+Left/Right in
a LineEdit or TextEdit.
Fixes #25681

(cherry picked from commit 8851e16f75)
This commit is contained in:
Paul Trojahn 2019-03-09 19:45:06 +01:00 committed by Rémi Verschelde
parent af3b157517
commit f5def1329e
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@
static bool _is_text_char(CharType c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
return !is_symbol(c);
}
void LineEdit::_gui_input(Ref<InputEvent> p_event) {

View File

@ -50,7 +50,7 @@ inline bool _is_symbol(CharType c) {
static bool _is_text_char(CharType c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
return !is_symbol(c);
}
static bool _is_whitespace(CharType c) {