Merge pull request #26848 from ptrojahn/utf8navigation

Support UTF-8 in TextEdit and LineEdit navigation
This commit is contained in:
Rémi Verschelde 2019-06-03 22:28:54 +02:00 committed by GitHub
commit 774a9fde84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,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) {