diff options
author | George Marques <george@gmarqu.es> | 2018-09-09 18:21:33 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-09 18:21:33 -0300 |
commit | af290f7b7d0ea22fbb8d4c3ca5c5a8fb72a30a7e (patch) | |
tree | 057d9d4a707ea526028cd30b243d0dfcf4112f68 /scene/gui/text_edit.cpp | |
parent | 1093c0ff51b980634dffdd9618eaa53061da6419 (diff) | |
parent | f051f5110e39873a304aace622eaeb4a802f10ab (diff) |
Merge pull request #21866 from Paulb23/fix_scientific_notation_highlight_issue_21435
Fixed scientific notation not highlighting correctly, issue 21435
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index ec98b01ced..a32beecdd9 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -6400,8 +6400,8 @@ Map<int, TextEdit::HighlighterInfo> TextEdit::_get_line_syntax_highlighting(int is_hex_notation = false; } - // check for dot or underscore or 'x' for hex notation in floating point number - if ((str[j] == '.' || str[j] == 'x' || str[j] == '_' || str[j] == 'f') && !in_word && prev_is_number && !is_number) { + // check for dot or underscore or 'x' for hex notation in floating point number or 'e' for scientific notation + if ((str[j] == '.' || str[j] == 'x' || str[j] == '_' || str[j] == 'f' || str[j] == 'e') && !in_word && prev_is_number && !is_number) { is_number = true; is_symbol = false; is_char = false; |