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
This commit is contained in:
Paul Trojahn 2019-03-09 19:45:06 +01:00
parent d41cd57595
commit 8851e16f75
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) {