mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Don't reset color if the previous token is a number ending with a dot.
This commit is contained in:
parent
9b50ea8ade
commit
aa8acd1a04
1 changed files with 3 additions and 1 deletions
|
@ -437,7 +437,9 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_l
|
||||||
if (col != Color()) {
|
if (col != Color()) {
|
||||||
for (int k = j - 1; k >= 0; k--) {
|
for (int k = j - 1; k >= 0; k--) {
|
||||||
if (str[k] == '.') {
|
if (str[k] == '.') {
|
||||||
col = Color(); // Keyword, member & global func indexing not allowed.
|
// Keyword, member, & global func indexing not allowed,
|
||||||
|
// but don't reset color if prev was a number like "5."
|
||||||
|
col = (prev_type == NUMBER) ? col : Color();
|
||||||
break;
|
break;
|
||||||
} else if (str[k] > 32) {
|
} else if (str[k] > 32) {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue