summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 5d429f9f91..1b87771fd4 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -894,17 +894,18 @@ void TextEdit::_notification(int p_what) {
is_hex_notation = false;
}
- // check for dot or 'x' for hex notation in floating point number
- if ((str[j] == '.' || str[j] == 'x') && !in_word && prev_is_number && !is_number) {
+ // check for dot or underscore or 'x' for hex notation in floating point number
+ if ((str[j] == '.' || str[j] == 'x' || str[j] == '_') && !in_word && prev_is_number && !is_number) {
is_number = true;
is_symbol = false;
+ is_char = false;
if (str[j] == 'x' && str[j - 1] == '0') {
is_hex_notation = true;
}
}
- if (!in_word && _is_char(str[j])) {
+ if (!in_word && _is_char(str[j]) && !is_number) {
in_word = true;
}
@@ -2040,6 +2041,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
_confirm_completion();
accept_event();
+ emit_signal("request_completion");
return;
}