From aa8acd1a04bacf1a679a91573562b142c0f60264 Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Wed, 10 Sep 2025 17:21:03 -0700 Subject: [PATCH] Don't reset color if the previous token is a number ending with a dot. --- modules/gdscript/editor/gdscript_highlighter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index a0fadc3290d..121a263b5b6 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -437,7 +437,9 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_l if (col != Color()) { for (int k = j - 1; k >= 0; 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; } else if (str[k] > 32) { break;