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:
parent
af3b157517
commit
f5def1329e
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue