summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-03 22:28:54 +0200
committerGitHub <noreply@github.com>2019-06-03 22:28:54 +0200
commit774a9fde84a0282c40da1dd891b613ed200ff9a8 (patch)
tree0bc0d7f9080da4692e6f055bc6afb8c53f090529 /scene
parent85a338295859bd14817df675f9ce045f39658920 (diff)
parent8851e16f7508d27965bfb28647c982b7e3a8af81 (diff)
Merge pull request #26848 from ptrojahn/utf8navigation
Support UTF-8 in TextEdit and LineEdit navigation
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/text_edit.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index cc966efee9..58bdde1ffd 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -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) {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 3117d8c59f..6203b15992 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -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) {