summaryrefslogtreecommitdiffstats
path: root/modules/gdscript
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2024-02-26 20:25:27 +0300
committerDanil Alexeev <danil@alexeev.xyz>2024-02-26 20:49:05 +0300
commita10241bfe417ad1db29a0b8a75cf8db69fa27ce4 (patch)
tree2bf9bb92b17165c3a35c03b5a192964c50d68ba5 /modules/gdscript
parentbb6b06c81343073f10cbbd2af515cf0dac1e6549 (diff)
downloadredot-engine-a10241bfe417ad1db29a0b8a75cf8db69fa27ce4.tar.gz
GDScript: Fix type highlighting after whitespace
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/editor/gdscript_highlighter.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp
index 426565bb68..439555bacb 100644
--- a/modules/gdscript/editor/gdscript_highlighter.cpp
+++ b/modules/gdscript/editor/gdscript_highlighter.cpp
@@ -532,12 +532,14 @@ Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_l
}
}
- in_function_declaration = false;
- in_var_const_declaration = false;
- in_signal_declaration = false;
- in_function_name = false;
- in_lambda = false;
- in_member_variable = false;
+ if (!is_whitespace(str[j])) {
+ in_function_declaration = false;
+ in_var_const_declaration = false;
+ in_signal_declaration = false;
+ in_function_name = false;
+ in_lambda = false;
+ in_member_variable = false;
+ }
}
if (!in_raw_string && in_region == -1 && str[j] == 'r' && j < line_length - 1 && (str[j + 1] == '"' || str[j + 1] == '\'')) {