From e6ad5e23b4be79965d6ce2afe18909c3becd2754 Mon Sep 17 00:00:00 2001 From: Overblob Date: Sat, 14 Jul 2018 13:28:43 +0200 Subject: * Small hex/float/integer parsing refactoring * Potential bug fix on hex (cannot be used atm) * Added optional typing for floats, eg: "1f" -> "1.0" "1.f" -> "1.0" "1.99f" -> "1.99" "1." -> "1.0" --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 218b5060a1..52fe6615f2 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -6384,7 +6384,7 @@ Map TextEdit::_get_line_syntax_highlighting(int } // 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) { + if ((str[j] == '.' || str[j] == 'x' || str[j] == '_' || str[j] == 'f') && !in_word && prev_is_number && !is_number) { is_number = true; is_symbol = false; is_char = false; -- cgit v1.2.3