diff options
author | Overblob <xavier.patricelli@gmail.com> | 2018-07-14 13:28:43 +0200 |
---|---|---|
committer | Overblob <xavier.patricelli@gmail.com> | 2018-07-15 14:58:23 +0200 |
commit | e6ad5e23b4be79965d6ce2afe18909c3becd2754 (patch) | |
tree | e8e8928bd82e759ee9a9157336cff78d3bfa1fad /scene/gui | |
parent | 1fc7973a00e17025441b6b8333e38d1606c1d304 (diff) |
* 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"
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<int, TextEdit::HighlighterInfo> 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; |