1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix auto-indentation in typed arrays, comments, and after colon

Now the editor won't add indentation when pressing enter, is
declaring typed variables and there is a colon in the comment

example:
var a:=0#:[press enter]
no indentation
This commit is contained in:
Manuel Dun
2023-04-16 15:37:36 -04:00
parent 49a196277f
commit fa7e6ddb83
2 changed files with 12 additions and 1 deletions

View File

@@ -1075,7 +1075,7 @@ void CodeEdit::_new_line(bool p_split_current_line, bool p_above) {
for (; line_col < cc; line_col++) {
char32_t c = line[line_col];
if (auto_indent_prefixes.has(c)) {
if (auto_indent_prefixes.has(c) && is_in_comment(cl, line_col) == -1) {
should_indent = true;
indent_char = c;
continue;